summaryrefslogtreecommitdiff
path: root/pod/buildtoc
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2011-12-17 21:45:14 +0100
committerNicholas Clark <nick@ccl4.org>2011-12-19 13:55:18 +0100
commitb186d677a9fa494035b07d613cfd0fdbaf1aaa5d (patch)
treeca96f196d80f70a912fff7a4b5d314e85085444a /pod/buildtoc
parentfcdc6846043a49b06ba005ecfc5e9064e17f049d (diff)
downloadperl-b186d677a9fa494035b07d613cfd0fdbaf1aaa5d.tar.gz
buildtoc should use the correct path when looking for a .pm's .pod file.
This corrects commit be6d62867c9b925b, which attempted to avoid a warning about lack of Pod in a .pm file if it had a corresponding .pod file. However, the commit would never actually find the .pod file because it used $File::Find::name as the basis for the search, instead of $_. This falls foul of the same problem as described in the previous commit - File::Find::find() changes directory, hence $File::Find::name points somewhere bogus, whilst $_ contains the name to use. With this change, pod/buildtoc no longer warns about the 20 relevant files.
Diffstat (limited to 'pod/buildtoc')
-rw-r--r--pod/buildtoc2
1 files changed, 1 insertions, 1 deletions
diff --git a/pod/buildtoc b/pod/buildtoc
index b8a54825e6..25ff14a8f8 100644
--- a/pod/buildtoc
+++ b/pod/buildtoc
@@ -35,7 +35,7 @@ find(sub {
return if $file =~ m!(?:^|/)t/!;
return if $file =~ m!lib/Net/FTP/.+\.pm!; # Hi, Graham! :-)
return if $file =~ m!XS/(?:APItest|Typemap)!;
- my $pod = $file;
+ my $pod = $_;
return if $pod =~ s/pm$/pod/ && -e $pod;
open my $f, '<', $_ or my_die "Can't open file '$_': $!";
{