1

I wanted to get coverage of my Perl based application in CentOS with apache web server, and went for the Devel::Cover to get it done. After some initial struggles, I got it installed. Since the PERL5OPT env variable did not help me in getting the coverage, I tried to include use Devel::Cover inside the code (I know it's a bad idea, but it serves my purpose) . The cover_db is generating its run/structures after I restart the webserver, but the data seems to be having transactions done with the CPAN generic modules as well, which reduce the total coverage score.

For example: if I use a single method from Net::FTP, it reduces the total score by considering the total number of lines in that module. Likewise for all the modules from CPAN.

What I need is the ability to select the files from a specific directory for coverage and ignore all the rest. From the description, it seems the +inc and -inc options are designed for this, but when I try to use them, I get the following error

Unknown option: inc

I would like to know couple of things.

  1. After cover_db is updated with the transactions, is it possible to filter out from it using cover -options during generation of report?
  2. Is there any other way I could get the coverage of only specific paths?

Appreciate the response.

i alarmed alien
  • 9,412
  • 3
  • 27
  • 40
Prasanth R
  • 11
  • 1

0 Answers0