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.
=cut
@ISA = qw(Exporter);
-@EXPORT = qw(cwd getcwd fastcwd);
+@EXPORT = qw(cwd getcwd fastcwd fastgetcwd);
@EXPORT_OK = qw(chdir);
# use strict;
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] ||
*cwd = \&_vms_pwd;
*getcwd = \&_vms_pwd;
+ *fastcwd = \&_vms_cwd;
*fastgetcwd = \&_vms_cwd;
}
elsif ($osname eq 'NT') {