summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2011-01-08 15:07:51 -0700
committerKarl Williamson <public@khwilliamson.com>2011-01-08 16:12:00 -0700
commit808910a96451318c19527b7b4e9726028fd0bd96 (patch)
tree4f59b5ad4e53a61c219584fe9049f8043627f181 /t
parenta4a4c9e2c086dd5f7b7b05789161614dbbe8385b (diff)
downloadperl-808910a96451318c19527b7b4e9726028fd0bd96.tar.gz
diag.t: Use variable for pod name
Diffstat (limited to 't')
-rw-r--r--t/porting/diag.t9
1 files changed, 5 insertions, 4 deletions
diff --git a/t/porting/diag.t b/t/porting/diag.t
index 73270d4182..9c9d74c770 100644
--- a/t/porting/diag.t
+++ b/t/porting/diag.t
@@ -59,9 +59,10 @@ while (<DATA>) {
$entries{$_}{todo}=1;
}
+my $pod = "pod/perldiag.pod";
my $cur_entry;
-open my $diagfh, "<", "pod/perldiag.pod"
- or die "Can't open pod/perldiag.pod: $!";
+open my $diagfh, "<", $pod
+ or die "Can't open $pod: $!";
while (<$diagfh>) {
if (m/^=item (.*)/) {
@@ -239,7 +240,7 @@ sub check_file {
# There is no listing, but it is in the list of exceptions. TODO FAIL.
fail($name);
diag(
- " Message '$name'\n from $codefn line $. is not listed in pod/perldiag.pod\n".
+ " Message '$name'\n from $codefn line $. is not listed in $pod\n".
" (but it wasn't documented in 5.10 either, so marking it TODO)."
);
}
@@ -260,7 +261,7 @@ sub check_file {
# No listing found, and no excuse either.
# Find the correct place in perldiag.pod, and add a stanza beginning =item $name.
fail($name);
- diag(" Message '$name'\n from $codefn line $. is not listed in pod/perldiag.pod");
+ diag(" Message '$name'\n from $codefn line $. is not listed in $pod");
}
# seen it, so only fail once for this message
$entries{$name}{seen}++;