summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMichael G. Schwern <schwern@pobox.com>2001-11-08 19:41:56 -0500
committerAbhijit Menon-Sen <ams@wiw.org>2001-11-09 07:33:49 +0000
commit7dc9aaa56b11c3e04f31eb9de23451166e23126f (patch)
tree1486f58afb581da6d385a991c3802a8d189600ba /lib
parentac5ea53171baa7dab1a92df1eacf8d2fe19cbdbb (diff)
downloadperl-7dc9aaa56b11c3e04f31eb9de23451166e23126f.tar.gz
Helpful File::Find debugging code
Message-Id: <20011109004156.L5587@blackrider> p4raw-id: //depot/perl@12910
Diffstat (limited to 'lib')
-rw-r--r--lib/File/Find/t/find.t19
1 files changed, 18 insertions, 1 deletions
diff --git a/lib/File/Find/t/find.t b/lib/File/Find/t/find.t
index 682d2332d5..823c7b15cd 100644
--- a/lib/File/Find/t/find.t
+++ b/lib/File/Find/t/find.t
@@ -18,6 +18,23 @@ BEGIN {
if ( $symlink_exists ) { print "1..188\n"; }
else { print "1..78\n"; }
+# Uncomment this to see where File::Find is chdir'ing to. Helpful for
+# debugging its little jaunts around the filesystem.
+# BEGIN {
+# use Cwd;
+# *CORE::GLOBAL::chdir = sub ($) {
+# my($file, $line) = (caller)[1,2];
+#
+# printf "# cwd: %s\n", cwd();
+# print "# chdir: @_ from $file at $line\n";
+# my($return) = CORE::chdir($_[0]);
+# printf "# newcwd: %s\n", cwd();
+#
+# return $return;
+# };
+# }
+
+
BEGIN {
use File::Spec;
if ($^O eq 'MSWin32' || $^O eq 'cygwin' || $^O eq 'VMS')
@@ -60,7 +77,7 @@ sub cleanup {
rmdir dir_path('fa');
rmdir dir_path('fb', 'fba');
rmdir dir_path('fb');
- chdir File::Spec->updir;
+ chdir(File::Spec->updir);
rmdir dir_path('for_find');
}
}