summaryrefslogtreecommitdiff
path: root/lib/File/Find.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/File/Find.pm')
-rw-r--r--lib/File/Find.pm11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/File/Find.pm b/lib/File/Find.pm
index c674b2c5f6..42905dec80 100644
--- a/lib/File/Find.pm
+++ b/lib/File/Find.pm
@@ -1,5 +1,5 @@
package File::Find;
-require 5.005;
+use 5.005_64;
require Exporter;
require Cwd;
@@ -53,12 +53,12 @@ If either I<follow> or I<follow_fast> is in effect:
=over 6
-=item
+=item *
It is guarantueed that an I<lstat> has been called before the user's
I<wanted()> function is called. This enables fast file checks involving S< _>.
-=item
+=item *
There is a variable C<$File::Find::fullname> which holds the absolute
pathname of the file with all symbolic links resolved
@@ -270,7 +270,7 @@ sub Follow_SymLink($) {
return $AbsName;
}
-use vars qw/ $dir $name $fullname $prune /;
+our($dir, $name, $fullname, $prune);
sub _find_dir_symlnk($$$);
sub _find_dir($$$);
@@ -309,6 +309,8 @@ sub _find_opt {
$top_item =~ s|/$|| unless $top_item eq '/';
$Is_Dir= 0;
+ ($topdev,$topino,$topmode,$topnlink) = stat $top_item;
+
if ($follow) {
if (substr($top_item,0,1) eq '/') {
$abs_dir = $top_item;
@@ -331,7 +333,6 @@ sub _find_opt {
}
else { # no follow
$topdir = $top_item;
- ($topdev,$topino,$topmode,$topnlink) = lstat $top_item;
unless (defined $topnlink) {
warn "Can't stat $top_item: $!\n";
next Proc_Top_Item;