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);
$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);
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, @_);
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, @_);