diff --git a/t/op/sprintf2.t b/t/op/sprintf2.t index 2a59d1c796..476a910884 100644 --- a/t/op/sprintf2.t +++ b/t/op/sprintf2.t @@ -265,7 +265,6 @@ if ($Config{nvsize} == 8 && print "# no hexfloat tests\n"; } -use strict; use Config; is( diff --git a/t/op/stash.t b/t/op/stash.t index af018f3fa9..8138180f2f 100644 --- a/t/op/stash.t +++ b/t/op/stash.t @@ -55,12 +55,8 @@ SKIP: { ); } -# now tests with strictures - -{ - use strict; - ok( !exists $pig::{bodine}, q(referencing a non-existent stash element doesn't produce stricture errors) ); -} +ok( !exists $pig::{bodine}, + q(referencing a non-existent stash element doesn't produce stricture errors) ); our $TODO; SKIP: { @@ -257,7 +253,7 @@ fresh_perl_is( # effectively rename a stash *slin:: = *rile::; *rile:: = *zor::; - + ::is *$globref, "*rile::tat", 'globs stringify the same way when stashes are moved'; ::is ref $obj, "rile", diff --git a/t/op/sub.t b/t/op/sub.t index 1d48c1b1d4..d149328d24 100644 --- a/t/op/sub.t +++ b/t/op/sub.t @@ -187,7 +187,7 @@ ok !exists $INC{"re.pm"}, 're.pm not loaded yet'; # [perl #122107] previously this would return # Subroutine BEGIN redefined at (eval 2) line 2. fresh_perl_is(<<'EOS', "", { stderr => 1 }, -use strict; use warnings; eval q/use File::{Spec}/; eval q/use File::Spec/; +use warnings; eval q/use File::{Spec}/; eval q/use File::Spec/; EOS "check special blocks are cleared on error"); diff --git a/t/op/taint.t b/t/op/taint.t index 97929bccf8..b5ca317184 100644 --- a/t/op/taint.t +++ b/t/op/taint.t @@ -14,7 +14,6 @@ BEGIN { require './loc_tools.pl'; } -use strict; use Config; plan tests => 1052; @@ -1340,7 +1339,7 @@ violates_taint(sub { link $TAINT, '' }, 'link'); SKIP: { # wildcard expansion doesn't invoke shell on VMS, so is safe skip "This is not VMS", 2 unless $Is_VMS; - + isnt(join('', eval { glob $foo } ), '', 'globbing'); is($@, ''); } @@ -1464,7 +1463,7 @@ violates_taint(sub { link $TAINT, '' }, 'link'); { # No reliable %Config check for getpw* SKIP: { - skip "getpwent() is not available", 9 unless + skip "getpwent() is not available", 9 unless eval { setpwent(); getpwent() }; setpwent(); @@ -1493,7 +1492,7 @@ violates_taint(sub { link $TAINT, '' }, 'link'); } SKIP: { - skip "readlink() or symlink() is not available" unless + skip "readlink() or symlink() is not available" unless $Config{d_readlink} && $Config{d_symlink}; my $symlink = "sl$$"; @@ -1566,7 +1565,7 @@ SKIP: { warn "# shmget failed: $!\n"; } - skip "SysV shared memory operation failed", 1 unless + skip "SysV shared memory operation failed", 1 unless $rcvd eq $sent; is_tainted($rcvd, "shmread"); @@ -1738,9 +1737,9 @@ SKIP: { ${$_ [0]} } - + package main; - + my $bar = "The Big Bright Green Pleasure Machine"; taint_these $bar; tie my ($foo), Tie => $bar; @@ -1773,13 +1772,13 @@ like($@, qr/^Modification of a read-only value attempted/, { # bug 20011111.105 (#7897) - + my $re1 = qr/x$TAINT/; is_tainted($re1); - + my $re2 = qr/^$re1\z/; is_tainted($re2); - + my $re3 = "$re2"; is_tainted($re3); } @@ -1811,15 +1810,15 @@ TODO: { violates_taint(sub { system $TAINT 'notaint' }, 'system'); violates_taint(sub { system {'notaint'} $TAINT }, 'system'); - eval { + eval { no warnings; - system("lskdfj does not exist","with","args"); + system("lskdfj does not exist","with","args"); }; is($@, ""); eval { no warnings; - exec("lskdfj does not exist","with","args"); + exec("lskdfj does not exist","with","args"); }; is($@, ""); @@ -2525,7 +2524,7 @@ is eval { eval $::x.1 }, 1, 'reset does not taint undef'; $ENV{PATH} = $old_env_path if $Is_MSWin32; is runperl( switches => [ '-T' ], - prog => 'use constant K=>$^X; 0 if K; BEGIN{} use strict; ' + prog => 'use constant K=>$^X; 0 if K; BEGIN{} use Getopt::Long; ' .'print 122669, qq-\n-', stderr => 1, ), "122669\n",