Output subroutines missing POD regardless of coverage threshold.

Fix the threshold to work correctly based on ENV.
This commit is contained in:
Colin Kuskie 2009-04-02 16:58:38 +00:00
parent ae4917a644
commit ae3b94c242

View file

@ -18,8 +18,8 @@ use Pod::Coverage;
use File::Find; use File::Find;
use File::Spec; use File::Spec;
my $threshold = $ENV{POD_COVERAGE} ? 0.75 my $threshold = $ENV{POD_COVERAGE} == 2 ? 0.9999
: $ENV{POD_COVERAGE} == 2 ? 0.9999 : $ENV{POD_COVERAGE} ? 0.75
: 0; : 0;
my @modules = (); my @modules = ();
@ -37,7 +37,7 @@ foreach my $package (sort @modules) {
SKIP: { SKIP: {
skip "No subroutines found by Devel::Symdump for $package", 1 if $goodReason; skip "No subroutines found by Devel::Symdump for $package", 1 if $goodReason;
ok($coverage, sprintf "%s has %d%% POD coverage", $package, $pc->coverage*100); ok($coverage, sprintf "%s has %d%% POD coverage", $package, $pc->coverage*100);
if (!$coverage && $ENV{POD_COVERAGE} ==2) { if (!$coverage && $ENV{POD_COVERAGE}) {
diag Dumper [$pc->naked]; diag Dumper [$pc->naked];
} }
} }