summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2011-09-21 17:46:43 +0200
committerNicholas Clark <nick@ccl4.org>2011-09-21 17:46:43 +0200
commit2c88d70d6f8de88325de16157d4a9fa59e085933 (patch)
treead54ea9dc153e3f611bb044cff73a3b3d631b6a4
parentca420de31dd6b64a0b6c6516effc515706e0e608 (diff)
downloadperl-smoke-me/podcheck-_pm.PL.tar.gz
Teach t/porting/podcheck.t that *_pm.PL files generate *.pm files.smoke-me/podcheck-_pm.PL
Without this, it assumes that cpan/Devel-PPPort/PPPort_pm.PL and lib/Devel/PPPort.pm have a duplicate =name. This can be covered up by adding an exception for lib/Devel/PPPort.pm, but that hides the underlying cause. The (believed) duplicate name was first exposed when df80274d3278c640 made t/porting/podcheck.t case-insensitive, so as to work on classic VMS filesystems, part of which required removing a skip on all files matching /\.PL$/
-rw-r--r--t/porting/known_pod_issues.dat1
-rw-r--r--t/porting/podcheck.t28
2 files changed, 17 insertions, 12 deletions
diff --git a/t/porting/known_pod_issues.dat b/t/porting/known_pod_issues.dat
index fc9d85f481..5d2924346c 100644
--- a/t/porting/known_pod_issues.dat
+++ b/t/porting/known_pod_issues.dat
@@ -309,7 +309,6 @@ lib/dbm_filter/encode.pm Verbatim line length including indents exceeds 79 by 1
lib/dbm_filter/int32.pm Verbatim line length including indents exceeds 79 by 1
lib/dbm_filter/null.pm Verbatim line length including indents exceeds 79 by 1
lib/dbm_filter/utf8.pm Verbatim line length including indents exceeds 79 by 1
-lib/devel/ppport.pm Pod NAME already used 1
lib/english.pm Verbatim line length including indents exceeds 79 by 1
lib/exporter.pm Verbatim line length including indents exceeds 79 by 2
lib/extutils/embed.pm Verbatim line length including indents exceeds 79 by 2
diff --git a/t/porting/podcheck.t b/t/porting/podcheck.t
index 4b3ae2a5c0..a3ad52ace9 100644
--- a/t/porting/podcheck.t
+++ b/t/porting/podcheck.t
@@ -1477,21 +1477,27 @@ foreach my $filename (@files) {
$checker->set_skip("$filename is a README apparently for $prior_filename");
} elsif (! $do_upstream_cpan && $filename =~ /^cpan/) {
$checker->set_skip("CPAN is upstream for $filename");
- } else { # Here have two pods with identical names that differ
- $prior_checker->poderror(
+ } else {
+ my ($leaf1) = $filename =~ m!([^/]+)\.pm\z!;
+ my ($leaf2) = $prior_filename =~ m!([^/]+)_pm\.PL\z!i;
+ if (defined $leaf1 && defined $leaf2 && $leaf1 eq $leaf2) {
+ $checker->set_skip("$filename was generated by $prior_filename");
+ } else { # Here have two pods with identical names that differ
+ $prior_checker->poderror(
+ { -msg => $duplicate_name,
+ -line => "???",
+ parameter => "'$filename' also has NAME '$name'"
+ });
+ $checker->poderror(
{ -msg => $duplicate_name,
-line => "???",
- parameter => "'$filename' also has NAME '$name'"
+ parameter => "'$prior_filename' also has NAME '$name'"
});
- $checker->poderror(
- { -msg => $duplicate_name,
- -line => "???",
- parameter => "'$prior_filename' also has NAME '$name'"
- });
- # Changing the names helps later.
- $prior_checker->name("$name version arbitrarily numbered 1");
- $checker->name("$name version arbitrarily numbered 2");
+ # Changing the names helps later.
+ $prior_checker->name("$name version arbitrarily numbered 1");
+ $checker->name("$name version arbitrarily numbered 2");
+ }
}
# In any event, don't process this pod that has the same name as