From: Rafael Garcia-Suarez Date: Mon, 3 Jun 2002 19:15:26 +0000 (+0000) Subject: Protect against localizing an %ENV slice. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=680d0beb650bdbbd6136e2939d2d4288dac7df6c;p=p5sagit%2Fp5-mst-13.2.git Protect against localizing an %ENV slice. p4raw-id: //depot/perl@16982 --- diff --git a/lib/Cwd.pm b/lib/Cwd.pm index 8b00543..24ad1e2 100644 --- a/lib/Cwd.pm +++ b/lib/Cwd.pm @@ -196,7 +196,11 @@ $pwd_cmd ||= 'pwd'; # The 'natural and safe form' for UNIX (pwd may be setuid root) sub _backtick_pwd { - local @ENV{qw(PATH IFS CDPATH ENV BASH_ENV)}; + local $ENV{PATH}; + local $ENV{IFS}; + local $ENV{CDPATH}; + local $ENV{ENV}; + local $ENV{BASH_ENV}; my $cwd = `$pwd_cmd`; # Belt-and-suspenders in case someone said "undef $/". local $/ = "\n";