From ff504b36b0f6467f64b463fd17fb34f640855abc Mon Sep 17 00:00:00 2001 From: "John E. Malmberg" Date: Sun, 11 Nov 2007 14:09:17 -0600 Subject: [PATCH] patch@32274 t/op/taint.t not cleaning up properly on VMS. From: "John E. Malmberg" Message-id: <4737B5CD.90209@qsl.net> p4raw-id: //depot/perl@32278 --- t/op/taint.t | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/t/op/taint.t b/t/op/taint.t index bb23844..b2688cf 100755 --- a/t/op/taint.t +++ b/t/op/taint.t @@ -23,7 +23,11 @@ $| = 1; use vars qw($ipcsysv); # did we manage to load IPC::SysV? +my ($old_env_path, $old_env_dcl_path, $old_env_term); BEGIN { + $old_env_path = $ENV{'PATH'}; + $old_env_dcl_path = $ENV{'DCL$PATH'}; + $old_env_term = $ENV{'TERM'}; if ($^O eq 'VMS' && !defined($Config{d_setenv})) { $ENV{PATH} = $ENV{PATH}; $ENV{TERM} = $ENV{TERM} ne ''? $ENV{TERM} : 'dummy'; @@ -57,11 +61,22 @@ if ($Is_VMS) { for $x ('DCL$PATH', @MoreEnv) { ($old{$x}) = $ENV{$x} =~ /^(.*)$/ if exists $ENV{$x}; } + # VMS note: PATH and TERM are automatically created by the C + # library in VMS on reference to the their keys in %ENV. + # There is currently no way to determine if they did not exist + # before this test was run. eval <