summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2011-06-17 13:31:47 -0600
committerKarl Williamson <public@khwilliamson.com>2011-06-17 13:56:46 -0600
commit0496e0bbb6b3df0a2b11ac09dc574a5bc4a3b93f (patch)
treea602e5a92435fc793d0e83f59b58c943de0a9c36
parent477100f82ad27ba443afea27f06ee34e533b6be6 (diff)
downloadperl-0496e0bbb6b3df0a2b11ac09dc574a5bc4a3b93f.tar.gz
podcheck: Make sure perltoc is known
perltoc is problematic because it is machine generated from constituent pods. This means that errors in them propgagate to it. As a result, commit e678c2947ab9ff776af461b393f3a3eecebab64a just skipped it. But this led to pods that link to it being flagged as having broken links. This commit changes things so instead of skipping perltoc, it is added to the list of pods that are known but are parsed only when there are links to inside it (of which there are unlikely to be any), and then only for the existence of such targets.
-rw-r--r--t/porting/known_pod_issues.dat3
-rw-r--r--t/porting/podcheck.t20
2 files changed, 11 insertions, 12 deletions
diff --git a/t/porting/known_pod_issues.dat b/t/porting/known_pod_issues.dat
index 6d8444cece..45a845a367 100644
--- a/t/porting/known_pod_issues.dat
+++ b/t/porting/known_pod_issues.dat
@@ -217,13 +217,11 @@ pod/perldelta.pod Pod NAME already used -1
pod/perldiag.pod =item type mismatch 1
pod/perldiag.pod Verbatim line length including indents exceeds 80 by 2
pod/perldoc.pod ? Should you be using F<...> or maybe L<...> instead of 1
-pod/perldoc.pod Apparent broken link 1
pod/perldsc.pod Verbatim line length including indents exceeds 80 by 4
pod/perlebcdic.pod Apparent broken link 1
pod/perlebcdic.pod Verbatim line length including indents exceeds 80 by 273
pod/perlembed.pod Verbatim line length including indents exceeds 80 by 27
pod/perlfaq2.pod Verbatim line length including indents exceeds 80 by 1
-pod/perlfaq3.pod Apparent broken link 1
pod/perlfaq4.pod Should have =encoding statement because have non-ASCII 1
pod/perlfaq4.pod Verbatim line length including indents exceeds 80 by 16
pod/perlfaq5.pod Verbatim line length including indents exceeds 80 by 40
@@ -251,7 +249,6 @@ pod/perlintern.pod ? Should you be using L<...> instead of 5
pod/perlintern.pod Verbatim line length including indents exceeds 80 by 26
pod/perlinterp.pod ? Should you be using L<...> instead of 3
pod/perlinterp.pod Verbatim line length including indents exceeds 80 by 1
-pod/perlintro.pod Apparent broken link 1
pod/perlintro.pod Verbatim line length including indents exceeds 80 by 11
pod/perliol.pod Verbatim line length including indents exceeds 80 by 8
pod/perlipc.pod Verbatim line length including indents exceeds 80 by 21
diff --git a/t/porting/podcheck.t b/t/porting/podcheck.t
index 9d1586fdfa..9e946c2d70 100644
--- a/t/porting/podcheck.t
+++ b/t/porting/podcheck.t
@@ -906,10 +906,6 @@ my %excluded_files = (
"configpm" => 1,
"miniperl" => 1,
"perl" => 1,
-
- # It would be nice if we didn't have to skip this,
- # but the errors in it are too variable.
- "pod/perltoc.pod" => 1,
);
# Convert to more generic form.
@@ -920,11 +916,14 @@ foreach my $file (keys %excluded_files) {
# re to match files that are to be parsed only if there is an internal link
# to them. It does not include cpan, as whether those are parsed depends
-# on a switch. Currently, only the stable perldelta.pod's are included.
-# These all have characters between 'perl' and 'delta'. (Actually the
-# currently developed one matches as well, but is a duplicate of
-# perldelta.pod, so can be skipped, so fine for it to match this.
-my $only_for_interior_links_re = qr/ \b perl \d+ delta \. pod \b/x;
+# on a switch. Currently, only perltoc and the stable perldelta.pod's
+# are included. The latter all have characters between 'perl' and
+# 'delta'. (Actually the currently developed one matches as well, but
+# is a duplicate of perldelta.pod, so can be skipped, so fine for it to
+# match this.
+my $only_for_interior_links_re = qr/ \b perl \d+ delta \. pod \b
+ | ^ pod\/perltoc.pod $
+ /x;
{ # Closure
my $first_time = 1;
@@ -1315,6 +1314,9 @@ foreach my $filename (@files) {
elsif ($filename =~ /perl\d+delta/) {
$checker->set_skip("$filename is a stable perldelta");
}
+ elsif ($filename =~ /perltoc/) {
+ $checker->set_skip("$filename dependent on component pods");
+ }
else {
croak("Unexpected file '$filename' encountered that has parsing for interior-linking only");
}