diff --git a/xt/author/pod_checker.t b/xt/author/pod_checker.t old mode 100644 new mode 100755 index 4c7415bb00..b039664083 --- a/xt/author/pod_checker.t +++ b/xt/author/pod_checker.t @@ -10,8 +10,20 @@ push @files, qx{git ls-files '*.pl' '*.PL' '*.pm' '*.t'}; push @files, qx{git ls-files svc opac/svc}; # Files without extension chomp for @files; -plan tests => 1; +plan tests => scalar @files + 1; for my $file (@files) { - podchecker($file); + my $checker = Pod::Checker->new(); + $checker->parse_from_file( $file, \*STDERR ); + my $num_errors = $checker->num_errors; + my $num_warnings = $checker->num_warnings; + if ( $checker->num_errors > 0 ) { + fail("Found pod errors for $file"); + } elsif ( $checker->num_errors == -1 ) { + pass("Skip pod checker for $file - no pod found"); + } elsif ( $checker->num_warnings ) { + fail("Found pod warnings for $file"); + } else { + pass("pod for $file"); + } }