defined(%hash) is deprecated
(Maybe you should just omit the defined()?)
my %h ; defined %h ;
+
+ /---/ should probably be written as "---"
+ join(/---/, @foo);
+
+ %s() called too early to check prototype [Perl_peep]
+ fred() ; sub fred ($$) {}
+
Mandatory Warnings
------------------
oops: oopsAV [oopsAV] TODO
oops: oopsHV [oopsHV] TODO
-
-
__END__
# op.c
eval { getpwnam 1 }; # OP_GPWNAM
eval { getpwuid 1 }; # OP_GPWUID
EXPECT
-Useless use of repeat in void context at - line 3.
+Useless use of repeat (x) in void context at - line 3.
Useless use of wantarray in void context at - line 5.
Useless use of reference-type operator in void context at - line 12.
Useless use of reference constructor in void context at - line 13.
Useless use of sprintf in void context at - line 23.
Useless use of array element in void context at - line 24.
Useless use of array slice in void context at - line 26.
-Useless use of hash elem in void context at - line 29.
+Useless use of hash element in void context at - line 29.
Useless use of hash slice in void context at - line 30.
Useless use of unpack in void context at - line 31.
Useless use of pack in void context at - line 32.
Useless use of a constant in void context at - line 4.
########
# op.c
-$ENV{PERL_DESTRUCT_LEVEL} = 0 unless $ENV{PERL_DESTRUCT_LEVEL} > 3; # known scalar leak
+BEGIN{ $ENV{PERL_DESTRUCT_LEVEL} = 0 unless $ENV{PERL_DESTRUCT_LEVEL} > 3; } # known scalar leak
use warnings 'unsafe' ;
my $a ; my @a = () ; my %a = () ; my $b = \@a ; my $c = \%a ;
@a =~ /abc/ ;
%$c =~ tr/a/b/ ;
}
EXPECT
-Applying pattern match to @array will act on scalar(@array) at - line 5.
-Applying substitution to @array will act on scalar(@array) at - line 6.
-Can't modify private array in substitution at - line 6, near "s/a/b/ ;"
-Applying character translation to @array will act on scalar(@array) at - line 7.
-Applying pattern match to @array will act on scalar(@array) at - line 8.
-Applying substitution to @array will act on scalar(@array) at - line 9.
-Applying character translation to @array will act on scalar(@array) at - line 10.
-Applying pattern match to %hash will act on scalar(%hash) at - line 11.
-Applying substitution to %hash will act on scalar(%hash) at - line 12.
-Applying character translation to %hash will act on scalar(%hash) at - line 13.
-Applying pattern match to %hash will act on scalar(%hash) at - line 14.
-Applying substitution to %hash will act on scalar(%hash) at - line 15.
-Applying character translation to %hash will act on scalar(%hash) at - line 16.
+Applying pattern match (m//) to @array will act on scalar(@array) at - line 5.
+Applying substitution (s///) to @array will act on scalar(@array) at - line 6.
+Can't modify private array in substitution (s///) at - line 6, near "s/a/b/ ;"
+Applying transliteration (tr///) to @array will act on scalar(@array) at - line 7.
+Applying pattern match (m//) to @array will act on scalar(@array) at - line 8.
+Applying substitution (s///) to @array will act on scalar(@array) at - line 9.
+Applying transliteration (tr///) to @array will act on scalar(@array) at - line 10.
+Applying pattern match (m//) to %hash will act on scalar(%hash) at - line 11.
+Applying substitution (s///) to %hash will act on scalar(%hash) at - line 12.
+Applying transliteration (tr///) to %hash will act on scalar(%hash) at - line 13.
+Applying pattern match (m//) to %hash will act on scalar(%hash) at - line 14.
+Applying substitution (s///) to %hash will act on scalar(%hash) at - line 15.
+Applying transliteration (tr///) to %hash will act on scalar(%hash) at - line 16.
BEGIN not safe after errors--compilation aborted at - line 18.
########
# op.c
no warnings 'syntax' ;
print (ABC || 1) ;
EXPECT
-Probable precedence problem on logical or at - line 3.
+Probable precedence problem on logical or (||) at - line 3.
########
--FILE-- abc
Prototype mismatch: sub main::fred () vs ($) at - line 4.
Prototype mismatch: sub main::freD () vs ($) at - line 11.
Prototype mismatch: sub main::FRED () vs ($) at - line 14.
+########
+# op.c
+use warnings 'syntax' ;
+join /---/, 'x', 'y', 'z';
+EXPECT
+/---/ should probably be written as "---" at - line 3.
+########
+# op.c [Perl_peep]
+use warnings 'unsafe' ;
+fred() ;
+sub fred ($$) {}
+no warnings 'unsafe' ;
+joe() ;
+sub joe ($$) {}
+EXPECT
+main::fred() called too early to check prototype at - line 3.