I wanted to build an awesome place for people to discuss module specific issues, but I don't have any more time for this, and there are much better places to discuss Perl-related issues. I'd recommend asking your question on Stack Overflow or on Perl Monks.
If you are looking for a Perl tutorial or Perl-related news, I hope these links will serve you well.
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
Posted on 2009-05-19 14:32:44-07 by gerhard in response to 10750
Re: Coverage is not calculated for some lines on Module level
Additional hint: This seems to happen only if you first test the method as a library function
(use AcBaR::testCover; AcBaR::testCover::run();)
and then via CLI.
Direct Responses: Write a response