summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2011-06-16 18:40:14 -0600
committerKarl Williamson <public@khwilliamson.com>2011-06-16 18:52:07 -0600
commit1c01047d5418e941f0467e547c3fea34525c5815 (patch)
tree9d879b33aaa4d7c3947828727c7294a7cb99d2ea
parent03ca349ac05d45c55183105f95dc1784f97aa4e3 (diff)
downloadperl-1c01047d5418e941f0467e547c3fea34525c5815.tar.gz
podcheck.t: Special case perldelta
This adds a special case to the checks for perldelta to ignore the placeholder links (that by necessity are broken).
-rw-r--r--t/porting/known_pod_issues.dat2
-rw-r--r--t/porting/podcheck.t20
2 files changed, 16 insertions, 6 deletions
diff --git a/t/porting/known_pod_issues.dat b/t/porting/known_pod_issues.dat
index 8568a0750c..66cf578725 100644
--- a/t/porting/known_pod_issues.dat
+++ b/t/porting/known_pod_issues.dat
@@ -212,8 +212,6 @@ pod/perldebguts.pod Verbatim line length including indents exceeds 80 by 68
pod/perldebtut.pod Verbatim line length including indents exceeds 80 by 22
pod/perldebug.pod ? Should you be using L<...> instead of 2
pod/perldebug.pod Verbatim line length including indents exceeds 80 by 3
-pod/perldelta.pod Apparent broken link 1
-pod/perldelta.pod Apparent internal link is missing its forward slash 3
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
diff --git a/t/porting/podcheck.t b/t/porting/podcheck.t
index b1022e1c21..db3451fe68 100644
--- a/t/porting/podcheck.t
+++ b/t/porting/podcheck.t
@@ -187,6 +187,9 @@ L<Pod::Checker>
# has many false positives; higher numbers give more messages.
my $Warnings_Level = 200;
+# perldelta during construction may have place holder links.
+our @perldelta_ignore_links = ( "XXX", "perl5YYYdelta" );
+
# To see if two pods with the same NAME are actually copies of the same pod,
# which is not an error, it uses a checksum to save work.
my $digest_type = "SHA-1";
@@ -1358,12 +1361,21 @@ if (! $has_input_files) {
# Here, is a link to a target that we can't find. Check if
# there is an internal link on the page with the target name.
# If so, it could be that they just forgot the initial '/'
- if ($filename_to_pod{$filename}
- && $nodes{$filename_to_pod{$filename}}{$linked_to_page})
+ # But perldelta is handled specially: only do this if the
+ # broken link isn't one of the known bad ones (that are
+ # placemarkers and should be removed for the final)
+ my $NAME = $filename_to_pod{$filename};
+ if (! defined $NAME) {
+ $checker->poderror(\%problem);
+ }
+ elsif ($NAME ne "perldelta"
+ || ! grep { $linked_to_page eq $_ } @perldelta_ignore_links)
{
- $problem{-msg} = $broken_internal_link;
+ if ($nodes{$NAME}{$linked_to_page}) {
+ $problem{-msg} = $broken_internal_link;
+ }
+ $checker->poderror(\%problem);
}
- $checker->poderror(\%problem);
}
}
}