This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Upgrade Scalar-List-Utils from 1.46 to 1.47
[perl5.git] / cpan / Scalar-List-Utils / t / tainted.t
index e483dfd..fb83c86 100644 (file)
@@ -13,12 +13,10 @@ my $var = 2;
 
 ok( !tainted($var), 'known variable');
 
-my $key = (grep { !/^PERL/ } keys %ENV)[0];
+ok( tainted($^X),      'interpreter variable');
 
-ok( tainted($ENV{$key}),       'environment variable');
-
-$var = $ENV{$key};
-ok( tainted($var),     'copy of environment variable');
+$var = $^X;
+ok( tainted($var),     'copy of interpreter variable');
 
 {
     package Tainted;