This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Save and restore $ENV{'SYS$LOGIN'} only in VMS.
authorJarkko Hietaniemi <jhi@iki.fi>
Sat, 29 Sep 2001 13:54:04 +0000 (13:54 +0000)
committerJarkko Hietaniemi <jhi@iki.fi>
Sat, 29 Sep 2001 13:54:04 +0000 (13:54 +0000)
p4raw-id: //depot/perl@12267

t/op/chdir.t

index 764e31a..c668494 100644 (file)
@@ -11,12 +11,13 @@ require "test.pl";
 plan(tests => 31);
 
 my $IsVMS = $^O eq 'VMS';
+
 my ($saved_sys_login);
 BEGIN {
-    $saved_sys_login = $ENV{'SYS$LOGIN'};
+    $saved_sys_login = $ENV{'SYS$LOGIN'} if $^O eq 'VMS'
 }
 END {
-    $ENV{'SYS$LOGIN'} = $saved_sys_login;
+    $ENV{'SYS$LOGIN'} = $saved_sys_login if $^O eq 'VMS';
 }
 
 # Might be a little early in the testing process to start using these,