summaryrefslogtreecommitdiff
path: root/lib/File/Find.pm
diff options
context:
space:
mode:
authorjkeenan <jkeenan@cpan.org>2012-04-06 20:20:59 -0400
committerFather Chrysostomos <sprout@cpan.org>2012-05-21 16:51:39 -0700
commitc82ae0bcdb823612e23899f434944582e0695a04 (patch)
tree1e93b14e49fbf55ab11d09efd096b416e96c858d /lib/File/Find.pm
parent488985bfbca2ba74d2396b1a3442bfaa9e6bacfe (diff)
downloadperl-c82ae0bcdb823612e23899f434944582e0695a04.tar.gz
Individual files may appear in list of directories to be searched.
Document that, then demonstrate that with additional tests. For RT #59750.
Diffstat (limited to 'lib/File/Find.pm')
-rw-r--r--lib/File/Find.pm8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/File/Find.pm b/lib/File/Find.pm
index 9d8cc82fb1..fe50b4fb83 100644
--- a/lib/File/Find.pm
+++ b/lib/File/Find.pm
@@ -280,6 +280,14 @@ links that don't resolve:
-l && !-e && print "bogus link: $File::Find::name\n";
}
+Note that you may mix directories and (non-directory) files in the list of
+directories to be searched by the C<wanted()>.
+
+ find(\&wanted, "./foo", "./bar", "./baz/epsilon");
+
+In the example above, no file in F<./baz/> other than F<./baz/epsilon> will be
+evaluated by C<wanted()>.
+
See also the script C<pfind> on CPAN for a nice application of this
module.