X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCwd.pm;h=bc206db4d4dce55763ee86ba1ce2551e3f1026bb;hb=e05e23b19fadce89226416facb6c018853620278;hp=6b845108c252c170410b339d860b977feadef694;hpb=4633a7c4bad06b471d9310620b7fe8ddd158cccd;p=p5sagit%2Fp5-mst-13.2.git diff --git a/lib/Cwd.pm b/lib/Cwd.pm index 6b84510..bc206db 100644 --- a/lib/Cwd.pm +++ b/lib/Cwd.pm @@ -31,7 +31,7 @@ getcwd - get pathname of current working directory The getcwd() function re-implements the getcwd(3) (or getwd(3)) functions in Perl. -The fastgetcwd() function looks the same as getcwd(), but runs faster. +The fastcwd() function looks the same as getcwd(), but runs faster. It's also more dangerous because you might conceivably chdir() out of a directory that you can't chdir() back into. @@ -49,7 +49,7 @@ kept up to date it all packages which use chdir import it from Cwd. =cut @ISA = qw(Exporter); -@EXPORT = qw(cwd getcwd fastcwd); +@EXPORT = qw(cwd getcwd fastcwd fastgetcwd); @EXPORT_OK = qw(chdir); # use strict; @@ -114,8 +114,10 @@ sub getcwd unless (@tst = lstat("$dotdots/$dir")) { warn "lstat($dotdots/$dir): $!"; - closedir(PARENT); - return ''; + # Just because you can't lstat this directory + # doesn't mean you'll never find the right one. + # closedir(PARENT); + # return ''; } } while ($dir eq '.' || $dir eq '..' || $tst[0] != $pst[0] || @@ -249,6 +251,7 @@ if ($osname eq 'VMS') { *cwd = \&_vms_pwd; *getcwd = \&_vms_pwd; + *fastcwd = \&_vms_cwd; *fastgetcwd = \&_vms_cwd; } elsif ($osname eq 'NT') {