diff options
author | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2005-11-14 15:40:08 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2005-11-14 15:40:08 +0000 |
commit | 54bd407c97e6a92e0d8fe74bdc8d886f888a65cc (patch) | |
tree | 61b477e5c0678a7f741040466f1aa3ecaf1cc38a /pod | |
parent | 7eb550cf010090aecb73da60fde61194798b89d1 (diff) | |
download | perl-54bd407c97e6a92e0d8fe74bdc8d886f888a65cc.tar.gz |
A better fix for [perl #35847] File::Find not performing as documented,
suggested by Darren Dunham. Includes a fix to the code example that
uses File::Find in perlfaq3.
p4raw-id: //depot/perl@26128
Diffstat (limited to 'pod')
-rw-r--r-- | pod/perlfaq3.pod | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/pod/perlfaq3.pod b/pod/perlfaq3.pod index 67a8d43627..02e15b7c5c 100644 --- a/pod/perlfaq3.pod +++ b/pod/perlfaq3.pod @@ -85,10 +85,12 @@ with File::Find which is part of the standard library. use File::Find; my @files; - find sub { push @files, $File::Find::name if -f _ && /\.pm$/ }, - @INC; + find( + sub { push @files, $File::Find::name if -f $File::Find::name && /\.pm$/ }, + @INC + ); - print join "\n", @files; + print "$_\n" for @files; If you simply need to quickly check to see if a module is available, you can check for its documentation. If you can |