summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/File/Find.pm8
-rw-r--r--lib/find.pl11
-rw-r--r--lib/finddepth.pl11
3 files changed, 22 insertions, 8 deletions
diff --git a/lib/File/Find.pm b/lib/File/Find.pm
index c5ce68ca1a..1faea50158 100644
--- a/lib/File/Find.pm
+++ b/lib/File/Find.pm
@@ -74,7 +74,9 @@ that don't resolve:
sub find {
my $wanted = shift;
my $cwd = Cwd::cwd();
- my ($topdir,$topdev,$topino,$topmode,$topnlink);
+ # Localize these rather than lexicalizing them for backwards
+ # compatibility.
+ local($topdir,$topdev,$topino,$topmode,$topnlink);
foreach $topdir (@_) {
(($topdev,$topino,$topmode,$topnlink) = stat($topdir))
|| (warn("Can't stat $topdir: $!\n"), next);
@@ -163,7 +165,9 @@ sub finddepth {
$cwd = Cwd::fastcwd();;
- my($topdir, $topdev, $topino, $topmode, $topnlink);
+ # Localize these rather than lexicalizing them for backwards
+ # compatibility.
+ local($topdir, $topdev, $topino, $topmode, $topnlink);
foreach $topdir (@_) {
(($topdev,$topino,$topmode,$topnlink) = stat($topdir))
|| (warn("Can't stat $topdir: $!\n"), next);
diff --git a/lib/find.pl b/lib/find.pl
index 29b83b082c..ee5dc5d150 100644
--- a/lib/find.pl
+++ b/lib/find.pl
@@ -31,9 +31,14 @@
use File::Find ();
-*name = *File::Find::name;
-*prune = *File::Find::prune;
-*dir = *File::Find::dir;
+*name = *File::Find::name;
+*prune = *File::Find::prune;
+*dir = *File::Find::dir;
+*topdir = *File::Find::topdir;
+*topdev = *File::Find::topdev;
+*topino = *File::Find::topino;
+*topmode = *File::Find::topmode;
+*topnlink = *File::Find::topnlink;
sub find {
&File::Find::find(\&wanted, @_);
diff --git a/lib/finddepth.pl b/lib/finddepth.pl
index 5814a44b1f..bfa44bb1bc 100644
--- a/lib/finddepth.pl
+++ b/lib/finddepth.pl
@@ -30,9 +30,14 @@
use File::Find ();
-*name = *File::Find::name;
-*prune = *File::Find::prune;
-*dir = *File::Find::dir;
+*name = *File::Find::name;
+*prune = *File::Find::prune;
+*dir = *File::Find::dir;
+*topdir = *File::Find::topdir;
+*topdev = *File::Find::topdev;
+*topino = *File::Find::topino;
+*topmode = *File::Find::topmode;
+*topnlink = *File::Find::topnlink;
sub finddepth {
&File::Find::finddepth(\&wanted, @_);