diff options
Diffstat (limited to 'Master/tlpkg/tlperl/lib/File/Find.pm')
-rw-r--r-- | Master/tlpkg/tlperl/lib/File/Find.pm | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/Master/tlpkg/tlperl/lib/File/Find.pm b/Master/tlpkg/tlperl/lib/File/Find.pm index f2fe20b3327..d1dbc522584 100644 --- a/Master/tlpkg/tlperl/lib/File/Find.pm +++ b/Master/tlpkg/tlperl/lib/File/Find.pm @@ -3,7 +3,7 @@ use 5.006; use strict; use warnings; use warnings::register; -our $VERSION = '1.20'; +our $VERSION = '1.23'; require Exporter; require Cwd; @@ -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()> function. + + 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. @@ -515,6 +523,7 @@ sub _find_opt { Proc_Top_Item: foreach my $TOP (@_) { my $top_item = $TOP; + $top_item = VMS::Filespec::unixify($top_item) if $Is_VMS; ($topdev,$topino,$topmode,$topnlink) = $follow ? stat $top_item : lstat $top_item; @@ -1095,8 +1104,7 @@ $File::Find::current_dir = File::Spec->curdir || '.'; $File::Find::dont_use_nlink = 1 if $^O eq 'os2' || $^O eq 'dos' || $^O eq 'amigaos' || $Is_Win32 || - $^O eq 'interix' || $^O eq 'cygwin' || $^O eq 'epoc' || $^O eq 'qnx' || - $^O eq 'nto'; + $^O eq 'interix' || $^O eq 'cygwin' || $^O eq 'qnx' || $^O eq 'nto'; # Set dont_use_nlink in your hint file if your system's stat doesn't # report the number of links in a directory as an indication |