A while ago, Leif Eriksen dug into Devel::Cover to find out why TAP::Parser couldn't be covered. He found a bug and managed to produce a patch:
--- Devel-Cover-0.61-bad/lib/Devel/Cover/DB.pm 2007-01-11 06:42:48.000000000 +1100 +++ Devel-Cover-0.61-good/lib/Devel/Cover/DB.pm 2007-08-12 01:03:18.000000000 +1000 @@ -708,7 +708,7 @@ while (my ($criterion, $fc) = each %$f) { my $get = "get_$criterion"; - my $sc = $st->$get($digests{$digest}); + my $sc = $st->$get($file); # print STDERR "$criterion: ", Dumper $sc, $fc; next unless $sc; # TODO - why? my $cc = $cf->{$criterion} ||= {};
Today, while working on App::Pgrep (not released, but it's a PPI powered version of grep), I discovered I was also getting zero test coverage. I applied Leif's patch and all is well.
Paul Johnson hasn't released a new version of Devel::Cover yet (and rt is down so I can't see if the patch is there), so I figured some of you might find this useful.