Subject: | Incorrect report of missing POD tests |
I have a pod.t and a pod-coverage.t (I also tried renaming to capitalize the pod part, to no
avail), which test the pod correctness and coverage respectively. However, Test::Kwalitee
says:
t/kwalitee....NOK 12/13# Add a test using Test::Pod to check for pod correctness.Doesn't
include a test for pod correctness (Test::Pod)
and:
t/kwalitee....NOK 13/13# Add a test using Test::Pod::Coverage to check for POD
coverage.Doesn't include a test for pod coverage (Test::Pod::Coverage)
Should I be doing something different? The code for the two test files is below.
Cheers,
Gavin
#!/usr/bin/perl
use strict;
use warnings;
use diagnostics;
use Test::More;
# This test file will test that all of the pod in any files with a .pm
# or a .pl extension in the distribution have syntactically correct
# pod.
# if the Test::Pod modules are not installed, then the scripts are
# skipped.
eval {use Test::Pod 1.00};
plan skip_all => "This is not an error, Test::Pod 1.00 is required for testing POD" if $@;
all_pod_files_ok();
and:
#!/usr/bin/perl
use strict;
use warnings;
use diagnostics;
use Test::More;
eval {use Test::Pod::Coverage 1.00};
plan skip_all => "This is not an error, Test::Pod::Coverage 1.00 required for testing POD
coverage" if $@;
# We exclude the SWIG-generated Native.pm, since it has no POD.
my @modules = Test::Pod::Coverage::all_modules();
plan tests => scalar(@modules) - 1;
foreach my $module (@modules) {
next if $module =~ /.*::Native/;
pod_coverage_ok($module);
}