summaryrefslogtreecommitdiff
path: root/lib/Cwd.pm
diff options
context:
space:
mode:
authorWolfgang Laun <Wolfgang.Laun@alcatel.at>2000-08-28 15:08:30 +0200
committerJarkko Hietaniemi <jhi@iki.fi>2000-08-28 16:02:10 +0000
commit3c65c14be7caf9d59f60265b97510dd50142dc82 (patch)
treed2b135112508f249f023747358229bc0ffc1c381 /lib/Cwd.pm
parent476757f70a9a13196bdf0a87d8e24804db1e95bc (diff)
downloadperl-3c65c14be7caf9d59f60265b97510dd50142dc82.tar.gz
[ID 20000828.006] dir name "0" not safe with Cwd.pm
Message-Id: <200008281108.NAA00782@localhost.aut.alcatel.at> p4raw-id: //depot/perl@6858
Diffstat (limited to 'lib/Cwd.pm')
-rw-r--r--lib/Cwd.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Cwd.pm b/lib/Cwd.pm
index 1e544d9812..eb337b40e0 100644
--- a/lib/Cwd.pm
+++ b/lib/Cwd.pm
@@ -180,7 +180,7 @@ sub chdir_init {
}
sub chdir {
- my $newdir = shift || ''; # allow for no arg (chdir to HOME dir)
+ my $newdir = @? ? shift : ''; # allow for no arg (chdir to HOME dir)
$newdir =~ s|///*|/|g unless $^O eq 'MSWin32';
chdir_init() unless $chdir_init;
return 0 unless CORE::chdir $newdir;
@@ -271,7 +271,7 @@ sub abs_path
sub fast_abs_path {
my $cwd = getcwd();
- my $path = shift || '.';
+ my $path = @_ ? shift : '.';
CORE::chdir($path) || croak "Cannot chdir to $path:$!";
my $realpath = getcwd();
CORE::chdir($cwd) || croak "Cannot chdir back to $cwd:$!";
@@ -340,7 +340,7 @@ sub _qnx_cwd {
}
sub _qnx_abs_path {
- my $path = shift || '.';
+ my $path = @_ ? shift '.';
my $realpath=`/usr/bin/fullpath -t $path`;
chop $realpath;
return $realpath;