1 warn "Legacy library @{[(caller(0))[6]]} will be removed from the Perl core distribution in the next major release. Please install it from the CPAN distribution Perl4::CoreLibs. It is being used at @{[(caller)[1]]}, line @{[(caller)[2]]}.\n";
5 # This library is no longer being maintained, and is included for backward
6 # compatibility with Perl 4 programs which may require it.
7 # This legacy library is deprecated and will be removed in a future
10 # In particular, this should not be used as an example of modern Perl
11 # programming techniques.
13 # Suggested alternative: Cwd
15 # Usage: $cwd = &fastcwd;
17 # This is a faster version of getcwd. It's also more dangerous because
18 # you might chdir out of a directory that you can't chdir back into.
21 local($odev, $oino, $cdev, $cino, $tdev, $tino);
25 ($cdev, $cino) = stat('.');
27 ($odev, $oino) = ($cdev, $cino);
29 ($cdev, $cino) = stat('.');
30 last if $odev == $cdev && $oino == $cino;
38 ($tdev, $tino) = lstat($_);
39 last unless $tdev != $odev || $tino != $oino;
44 chdir($path = '/' . join('/', @path));