summaryrefslogtreecommitdiff
path: root/lib/Cwd.pm
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1998-05-14 10:53:55 +0000
committerGurusamy Sarathy <gsar@cpan.org>1998-05-14 10:53:55 +0000
commit20408e3ccf502b6ce4033d8203710405ec9ef8f6 (patch)
treeafa7181c847061200a7323363f84fe42102c2aa3 /lib/Cwd.pm
parent9b599b2a63d2324ddacddd9710c41b795a95070d (diff)
downloadperl-20408e3ccf502b6ce4033d8203710405ec9ef8f6.tar.gz
[win32] merge change#896 from maintbranch
p4raw-link: @896 on //depot/maint-5.004/perl: 0562b9ae2b0eff79632fc0164c13c34c06a019e2 p4raw-id: //depot/win32/perl@938
Diffstat (limited to 'lib/Cwd.pm')
-rw-r--r--lib/Cwd.pm13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/Cwd.pm b/lib/Cwd.pm
index 652ee7e493..64798da00f 100644
--- a/lib/Cwd.pm
+++ b/lib/Cwd.pm
@@ -20,11 +20,21 @@ getcwd - get pathname of current working directory
chdir "/tmp";
print $ENV{'PWD'};
+ use Cwd 'abs_path';
+ print abs_path($ENV{'PWD'});
+
+ use Cwd 'fast_abs_path';
+ print fast_abs_path($ENV{'PWD'});
+
=head1 DESCRIPTION
The getcwd() function re-implements the getcwd(3) (or getwd(3)) functions
in Perl.
+The abs_path() function takes a single argument and returns the
+absolute pathname for that argument. It uses the same algoritm as
+getcwd(). (actually getcwd() is abs_path("."))
+
The fastcwd() function looks the same as getcwd(), but runs faster.
It's also more dangerous because it might conceivably chdir() you out
of a directory that it can't chdir() you back into. If fastcwd
@@ -35,6 +45,9 @@ that it leaves you in the same directory that it started in. If it has
changed it will C<die> with the message "Unstable directory path,
current directory changed unexpectedly". That should never happen.
+The fast_abs_path() function looks the same as abs_path(), but runs faster.
+And like fastcwd() is more dangerous.
+
The cwd() function looks the same as getcwd and fastgetcwd but is
implemented using the most natural and safe form for the current
architecture. For most systems it is identical to `pwd` (but without