use warnings 'void' ;
"abc"; # OP_CONST
7 ; # OP_CONST
+5 || print "bad\n"; # test OPpCONST_SHORTCIRCUIT
+use constant U => undef;
+print "boo\n" if U; # test OPpCONST_SHORTCIRCUIT
no warnings 'void' ;
"abc"; # OP_CONST
7 ; # OP_CONST
use warnings 'parenthesis' ;
my $a, $b = (1,2);
my @foo,%bar, $quux; # there's a TAB here
+my $x, $y or print;
no warnings 'parenthesis' ;
my $c, $d = (1,2);
EXPECT
Value of readdir() operator can be "0"; test with defined() at - line 4.
########
# op.c
+use warnings 'misc';
+open FH, "<abc";
+$_ = <FH> err $_ = 1;
+($_ = <FH>) // ($_ = 1);
+opendir DH, ".";
+$_ = readdir DH err $_ = 1;
+$_ = <*> err $_ = 1;
+%a = (1,2,3,4) ;
+$_ = each %a err $_ = 1;
+EXPECT
+########
+# op.c
use warnings 'redefine' ;
sub fred {}
sub fred {}
$a = $b >= $c ^ $d;
$a = $b <= $c | $d;
$a = $b <=> $c & $d;
+$a &= $b == $c; $a |= $b == $c; $a ^= $b == $c; # shouldn't warn
no warnings 'precedence';
$a = $b & $c == $d;
$a = $b ^ $c != $d;
Useless localization of substr at - line 48.
Useless localization of match position at - line 49.
Useless localization of vec at - line 50.
+########
+# op.c
+use warnings 'deprecated';
+my $x1 if 0;
+my @x2 if 0;
+my %x3 if 0;
+my ($x4) if 0;
+my ($x5,@x6, %x7) if 0;
+0 && my $z1;
+0 && my (%z2);
+# these shouldn't warn
+our $x if 0;
+our $x unless 0;
+if (0) { my $w1 }
+if (my $w2) { $a=1 }
+if ($a && (my $w3 = 1)) {$a = 2}
+
+EXPECT
+Deprecated use of my() in false conditional at - line 3.
+Deprecated use of my() in false conditional at - line 4.
+Deprecated use of my() in false conditional at - line 5.
+Deprecated use of my() in false conditional at - line 6.
+Deprecated use of my() in false conditional at - line 7.
+Deprecated use of my() in false conditional at - line 8.
+Deprecated use of my() in false conditional at - line 9.