I am new to Perl and I am trying to generate a coverage report for a Perl script I had. I followed the steps mentioned here to install Devel-Cover https://code.activestate.com/ppm/Devel-Cover/ and ran
perl -MDevel::Cover script
I get some coverage info and that message
Pod coverage is unavailable. Please install Pod::Coverage from CPAN.
Then running command cover
to generate the report I get cover: Command not found.
Tring to run cpan install Pod::Coverage
as stated by the output but it fails. I am not sure what I am missing here.
I tried using Devel::Coverage too using
perl -d:Coverage script
But I got that output
Can't locate Devel/Coverage.pm in @INC (you may need to install the Devel::Coverage module) (@INC contains: /spiratech/tools/perllib /home/mmaher/.cache/activestate/02540130/lib/perl5/site_perl/5.32.0/x86_64-linux /home/mmaher/.cache/activestate/02540130/lib/perl5/site_perl/5.32.0 /home/mmaher/.cache/activestate/02540130/lib/perl5/5.32.0/x86_64-linux /home/mmaher/.cache/activestate/02540130/lib/perl5/5.32.0).
BEGIN failed--compilation aborted.
%!s(<nil>)
and I couldn't find any instructions on how to install it. I am using Perl v5.32.0