summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCraig A. Berry <craigberry@mac.com>2022-12-18 08:41:35 -0600
committerCraig A. Berry <craigberry@mac.com>2022-12-18 08:52:05 -0600
commit72cfb26c9e1bbf2c1960f63de5a70f9f4b73da4e (patch)
tree12ea21fd0d3ece744a658c98b271b31dca5277bb
parent571fb71d60722b214fbda092cd4fdaf3341bb750 (diff)
downloadperl-72cfb26c9e1bbf2c1960f63de5a70f9f4b73da4e.tar.gz
Remove dead VMS code in Cwd::_backtick_pwd
The code as written would have had no effect since the value in $^O is 'VMS' not 'vms' so it's better to remove the confused and confusing code. _backtick_pwd is not normally called on VMS because it has its own set of routines dispatched via the %METHOD_MAP hash. In the unlikely event that _backtick_pwd got called on VMS, it would either fail because there is no pwd command, or, if running under some Unix emulation environment, work just like Unix, and therefore need no special handling of $ENV{PATH} that is different from Unix.
-rw-r--r--dist/PathTools/Cwd.pm3
1 files changed, 1 insertions, 2 deletions
diff --git a/dist/PathTools/Cwd.pm b/dist/PathTools/Cwd.pm
index 58211ef8ec..5e4b674150 100644
--- a/dist/PathTools/Cwd.pm
+++ b/dist/PathTools/Cwd.pm
@@ -199,8 +199,7 @@ sub _backtick_pwd {
# executable, but it will blow up anyway under taint. We could set it to
# anything absolute. Perhaps "/" would be better.
local $ENV{PATH}= "/usr/bin"
- if $^O ne "vms" and $^O ne "amigaos";
- local $ENV{PATH} if $^O eq "vms";
+ if $^O ne "amigaos";
my $cwd = `$pwd_cmd`;
# Belt-and-suspenders in case someone said "undef $/".