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.
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 '$_': $!";
{