diff options
author | Steve Peters <steve@fisharerojo.org> | 2006-11-23 03:09:08 +0000 |
---|---|---|
committer | Steve Peters <steve@fisharerojo.org> | 2006-11-23 03:09:08 +0000 |
commit | e9475de8c2ea6600ed3517594b1793ffd3a89f27 (patch) | |
tree | f9ef3dc4cd8ef37c4833e4d0a103ac2ac6ea1684 /lib/Cwd.pm | |
parent | d6a9eb89513c8810816fb51d1ad3f1e7f7ad29ff (diff) | |
download | perl-e9475de8c2ea6600ed3517594b1793ffd3a89f27.tar.gz |
Upgrade to PathTools-3.24.
p4raw-id: //depot/perl@29356
Diffstat (limited to 'lib/Cwd.pm')
-rw-r--r-- | lib/Cwd.pm | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Cwd.pm b/lib/Cwd.pm index c8b3602b52..70aa8110bf 100644 --- a/lib/Cwd.pm +++ b/lib/Cwd.pm @@ -171,7 +171,7 @@ use strict; use Exporter; use vars qw(@ISA @EXPORT @EXPORT_OK $VERSION); -$VERSION = '3.23'; +$VERSION = '3.24'; @ISA = qw/ Exporter /; @EXPORT = qw(cwd getcwd fastcwd fastgetcwd); @@ -479,7 +479,9 @@ sub chdir { return 1; } - if ($newdir =~ m#^/#s) { + if (ref $newdir eq 'GLOB') { # in case a file/dir handle is passed in + $ENV{'PWD'} = cwd(); + } elsif ($newdir =~ m#^/#s) { $ENV{'PWD'} = $newdir; } else { my @curdir = split(m#/#,$ENV{'PWD'}); |