Don't clobber $^O when you're going to use it again.
authorCraig A. Berry <craigberry@mac.com>
Sun, 2 Jan 2011 21:16:11 +0000 (15:16 -0600)
committerCraig A. Berry <craigberry@mac.com>
Sun, 2 Jan 2011 21:16:11 +0000 (15:16 -0600)
Even if using it means relying on t/test.pl functionality such as
fresh_perl_is().

t/op/taint.t

index fc2fcd7..ee8e2aa 100644 (file)
@@ -1034,6 +1034,7 @@ TODO: {
     test !tainted($^O);
     if (!$^X) { } elsif ($^O eq 'bar') { }
     test !tainted($^O);
+    local $^O;  # We're going to clobber something test infrastructure depends on.
     eval '$^O = $^X';
     test $@ =~ /Insecure dependency in/;
 }