From 1341ebfbd18dfc3d6b93b5762d7343699d512356 Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Wed, 1 Apr 2009 04:27:00 +0000 Subject: [PATCH] Add more configuration to the POD coverage test. POD_COVERAGE==2 will check against 100% coverage and emit a list of modules that POD to be covered. --- t/POD.t | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/t/POD.t b/t/POD.t index 5564b433c..84164ddb7 100644 --- a/t/POD.t +++ b/t/POD.t @@ -20,12 +20,15 @@ use File::Spec; plan skip_all => 'set TEST_POD to enable this test' unless $ENV{TEST_POD}; -my $threshold = $ENV{POD_COVERAGE} ? 0.75 : 0; +my $threshold = $ENV{POD_COVERAGE} ? 0.75 + : $ENV{POD_COVERAGE} == 2 ? 0.9999 + : 0; my @modules = (); find(\&countModules, File::Spec->catdir( WebGUI::Test->lib, 'WebGUI' ) ); my $moduleCount = scalar(@modules); plan tests => $moduleCount; +use Data::Dumper; foreach my $package (sort @modules) { my $pc = Pod::Coverage->new( package=>$package, @@ -36,6 +39,9 @@ foreach my $package (sort @modules) { SKIP: { skip "No subroutines found by Devel::Symdump for $package", 1 if $goodReason; ok($coverage, sprintf "%s has %d%% POD coverage", $package, $pc->coverage*100); + if (!$coverage && $ENV{POD_COVERAGE} ==2) { + diag Dumper [$pc->naked]; + } } }