Posted on 2009-05-19 13:18:06-07 by gerhard
Coverage is not calculated for some lines on Module level
Im using Devel-Cover on Debian LINUX (Perl 5.8.8., cover version 0.59). For a small test module I get the following module coverage output

File Coverage File: /home/gerhard/workspace/acbrPl/AcBaR/testCover.pm Coverage: 100.0% line stmt time code 1 package AcBaR::testCover; 2 3 sub run { 4 5 163 print "Hello\n"; 5 5 49 return "Hello"; 6 } 7 8 if ( $0 eq __FILE__ ) { 9 run(); 10 } 11 1;
Question:
Although I ran some tests where I call the Module also via CLI, I get no coverage statement for the lines 8 and 9 (even not a red one with 0 coverage, although I know from the coverage of the run() method that the call of the run() method via line 9 is considered there.
Does anybody have an idea what is happening there?
Direct Responses: 10755 | Write a response
Perl Weekly newsletter
A free weekly newsletter for people who are busy to read all the blogs. click here to check it out.