diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 2000-01-28 18:10:12 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 2000-01-28 18:10:12 +0000 |
commit | 3d1e7443c642b103856ae14dc5e74c2cd625a408 (patch) | |
tree | ac8ba98ab10f6a989b85be19a601b711b42f12e4 /lib | |
parent | 0bfc1ec4be2c76cee8aace7737f6fec3baae5189 (diff) | |
download | perl-3d1e7443c642b103856ae14dc5e74c2cd625a408.tar.gz |
implement -follow option in find2perl (from Helmut Jarausch
<jarausch@igpm.rwth-aachen.de>)
p4raw-id: //depot/perl@4926
Diffstat (limited to 'lib')
-rw-r--r-- | lib/File/Find.pm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/File/Find.pm b/lib/File/Find.pm index 9963d8198b..42905dec80 100644 --- a/lib/File/Find.pm +++ b/lib/File/Find.pm @@ -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; |