3 Use of my $_ is experimental
6 Found = in conditional, should be ==
9 Scalar value %.*s better written as $%.*s"
13 Useless use of time in void context
14 Useless use of a variable in void context
15 Useless use of a constant in void context
20 Useless use of sort in scalar context
23 Applying %s to %s will act on scalar(%s)
24 my $a ; my @a = () ; my %a = () ; my $b = \@a ; my $c = \%a ;
39 Parentheses missing around "my" list at -e line 1.
42 Parentheses missing around "local" list at -e line 1.
45 Bareword found in conditional at -e line 1.
46 use warnings 'bareword'; my $x = print(ABC || 1);
48 Value of %s may be \"0\"; use \"defined\"
50 $x = 1 while $x = <FH> ;
52 Subroutine fred redefined at -e line 1.
53 sub fred{1;} sub fred{1;}
55 Constant subroutine %s redefined
56 sub fred() {1;} sub fred() {1;}
58 Format FRED redefined at /tmp/x line 5.
64 push on reference is experimental [ck_fun]
65 pop on reference is experimental
66 shift on reference is experimental
67 unshift on reference is experimental
68 splice on reference is experimental
70 Statement unlikely to be reached
71 (Maybe you meant system() when you said exec()?
74 Can't use defined(@array) (Maybe you should just omit the defined()?)
76 defined (@a = (1,2,3)) ;
78 Can't use defined(%hash) (Maybe you should just omit the defined()?)
81 "my %s" used in sort comparison
83 $[ used in comparison (did you mean $] ?)
85 each on reference is experimental [ck_each]
86 keys on reference is experimental
87 values on reference is experimental
89 length() used on @array (did you mean "scalar(@array)"?)
90 length() used on %hash (did you mean "scalar(keys %hash)"?)
92 /---/ should probably be written as "---"
95 %s() called too early to check prototype [Perl_peep]
96 fred() ; sub fred ($$) {}
99 Package '%s' not found (did you use the incorrect case?)
101 Use of /g modifier is meaningless in split
103 The bitwise feature is experimental [Perl_ck_bitop]
105 Possible precedence problem on bitwise %c operator [Perl_ck_bitop]
109 Prototype mismatch: [cv_ckproto]
113 oops: oopsAV [oopsAV] TODO
114 oops: oopsHV [oopsHV] TODO
118 use warnings 'experimental::lexical_topic' ;
121 no warnings 'experimental::lexical_topic' ;
125 Use of my $_ is experimental at - line 3.
126 Use of state $_ is experimental at - line 4.
129 use warnings 'syntax' ;
133 no warnings 'syntax' ;
138 Found = in conditional, should be == at - line 3.
139 Found = in conditional, should be == at - line 4.
142 use warnings 'syntax' ;
143 use constant foo => 1;
145 no warnings 'syntax' ;
150 use warnings 'syntax' ;
161 no warnings 'syntax' ;
165 Scalar value @a[3] better written as $a[3] at - line 3.
166 Scalar value @a{3} better written as $a{3} at - line 4.
167 Scalar value @a["]"] better written as $a["]"] at - line 5.
168 Scalar value @a{"]"} better written as $a{"]"} at - line 6.
169 Scalar value @a["}"] better written as $a["}"] at - line 7.
170 Scalar value @a{"}"} better written as $a{"}"} at - line 8.
171 Scalar value @a{...} better written as $a{...} at - line 9.
172 Scalar value @a{...} better written as $a{...} at - line 10.
173 Scalar value @a[...] better written as $a[...] at - line 11.
174 Scalar value @a[...] better written as $a[...] at - line 12.
178 use open qw( :utf8 :std );
179 use warnings 'syntax' ;
182 no warnings 'syntax' ;
186 Scalar value @à[3] better written as $à[3] at - line 5.
187 Scalar value @à{3} better written as $à{3} at - line 6.
191 use open qw( :utf8 :std );
192 use warnings 'syntax' ;
195 no warnings 'syntax' ;
199 Scalar value @ぁ[3] better written as $ぁ[3] at - line 5.
200 Scalar value @ぁ{3} better written as $ぁ{3} at - line 6.
203 # "Scalar value better written as" false positives
204 # [perl #28380] and [perl #114024]
205 use warnings 'syntax';
208 @h{qw"a b c"} = 1..3;
209 @h{qw'a b c'} = 1..3;
210 @h{qw$a b c$} = 1..3;
211 @h{qw-a b c-} = 1..3;
212 @h{qw#a b c#} = 1..3;
213 @h{ qw#a b c#} = 1..3;
214 @h{ qw#a b c#} = 1..3; # tab before qw
218 sub foo() { qw/abc def ghi/ }
219 @X{+foo} = ( 1 .. 3 );
220 $_ = "abc"; @X{split ""} = ( 1 .. 3 );
221 my @s = @f{"}", "a"};
222 my @s = @f{"]", "a"};
230 use constant phoo => 1..3;
244 no warnings 'experimental::autoderef';
247 @h{values $foo} if 0;
251 @h[qw"a b c"] = 1..3;
252 @h[qw'a b c'] = 1..3;
253 @h[qw$a b c$] = 1..3;
254 @h[qw-a b c-] = 1..3;
255 @h[qw#a b c#] = 1..3;
256 @h[ qw#a b c#] = 1..3;
257 @h[ qw#a b c#] = 1..3; # tab before qw
261 sub foo() { qw/abc def ghi/ }
262 @X[+foo] = ( 1 .. 3 );
263 $_ = "abc"; @X[split ""] = ( 1 .. 3 );
264 my @s = @f["}", "a"];
265 my @s = @f["]", "a"];
273 use constant phoo => 1..3;
287 no warnings 'experimental::autoderef';
290 @h[values $foo] if 0;
295 # "Scalar value better written as" should not trigger for syntax errors
296 use warnings 'syntax';
299 syntax error at - line 4, near "[]"
300 Execution of - aborted due to compilation errors.
307 Can't use a hash as a reference at - line 3.
314 Can't use a hash as a reference at - line 3.
321 Can't use an array as a reference at - line 3.
328 Can't use an array as a reference at - line 3.
332 $main::foo = {}; %$main::foo->{"bar"};
335 Can't use a hash as a reference at - line 3.
339 $foo = {}; %$foo->{"bar"};
342 Can't use a hash as a reference at - line 3.
346 $main::foo = []; @$main::foo->[34];
349 Can't use an array as a reference at - line 3.
353 $foo = []; @$foo->[34];
356 Can't use an array as a reference at - line 3.
359 use warnings 'void' ; no warnings 'experimental::smartmatch'; close STDIN ;
361 1 x 3 ; # OP_REPEAT (folded)
362 (1) x 3 ; # OP_REPEAT
364 wantarray ; # OP_WANTARRAY
374 defined $a ; # OP_DEFINED
377 length $a ; # OP_LENGTH
378 substr $a,1 ; # OP_SUBSTR
379 vec $a,1,2 ; # OP_VEC
380 index $a,1,2 ; # OP_INDEX
381 rindex $a,1,2 ; # OP_RINDEX
382 sprintf $a ; # OP_SPRINTF
386 #values %a ; # OP_VALUES
390 unpack "a", "a" ; # OP_UNPACK
391 pack $a,"" ; # OP_PACK
392 join "", @_ ; # OP_JOIN
393 (@a)[0,1] ; # OP_LSLICE
396 sort(1,2) ; # OP_SORT
397 reverse(1,2) ; # OP_REVERSE
402 fileno STDIN ; # OP_FILENO
404 tell STDIN ; # OP_TELL
405 readlink 1; # OP_READLINK
407 localtime ; # OP_LOCALTIME
409 eval { getgrnam 1 }; # OP_GGRNAM
410 eval { getgrgid 1 }; # OP_GGRGID
411 eval { getpwnam 1 }; # OP_GPWNAM
412 eval { getpwuid 1 }; # OP_GPWUID
413 prototype "foo"; # OP_PROTOTYPE
414 $a ~~ $b; # OP_SMARTMATCH
422 grep /42/, (1,2); # OP_GREP. Not warned about (yet). Grep git logs for void_unusual to see why...
424 Useless use of a constant ("111") in void context at - line 2.
425 Useless use of repeat (x) in void context at - line 3.
426 Useless use of wantarray in void context at - line 5.
427 Useless use of reference-type operator in void context at - line 12.
428 Useless use of reference constructor in void context at - line 13.
429 Useless use of single ref constructor in void context at - line 14.
430 Useless use of defined operator in void context at - line 15.
431 Useless use of hex in void context at - line 16.
432 Useless use of oct in void context at - line 17.
433 Useless use of length in void context at - line 18.
434 Useless use of substr in void context at - line 19.
435 Useless use of vec in void context at - line 20.
436 Useless use of index in void context at - line 21.
437 Useless use of rindex in void context at - line 22.
438 Useless use of sprintf in void context at - line 23.
439 Useless use of array element in void context at - line 24.
440 Useless use of array slice in void context at - line 26.
441 Useless use of hash element in void context at - line 29.
442 Useless use of hash slice in void context at - line 30.
443 Useless use of unpack in void context at - line 31.
444 Useless use of pack in void context at - line 32.
445 Useless use of join or string in void context at - line 33.
446 Useless use of list slice in void context at - line 34.
447 Useless use of sort in void context at - line 37.
448 Useless use of reverse in void context at - line 38.
449 Useless use of range (or flop) in void context at - line 41.
450 Useless use of caller in void context at - line 42.
451 Useless use of fileno in void context at - line 43.
452 Useless use of eof in void context at - line 44.
453 Useless use of tell in void context at - line 45.
454 Useless use of readlink in void context at - line 46.
455 Useless use of time in void context at - line 47.
456 Useless use of localtime in void context at - line 48.
457 Useless use of gmtime in void context at - line 49.
458 Useless use of getgrnam in void context at - line 50.
459 Useless use of getgrgid in void context at - line 51.
460 Useless use of getpwnam in void context at - line 52.
461 Useless use of getpwuid in void context at - line 53.
462 Useless use of subroutine prototype in void context at - line 54.
463 Useless use of smart match in void context at - line 55.
464 Useless use of numeric comparison (<=>) in void context at - line 56.
465 Useless use of a constant ("dsatrewq") in void context at - line 57.
466 Useless use of a constant ("diatrewq") in void context at - line 58.
467 Useless use of a constant ("igatrewq") in void context at - line 59.
468 Useless use of __SUB__ in void context at - line 61.
469 Useless use of anonymous array ([]) in void context at - line 62.
472 use warnings 'void' ; close STDIN ;
473 my $x = sort (2,1,3);
477 Useless use of sort in scalar context at - line 3.
480 no warnings 'void' ; close STDIN ;
483 wantarray ; # OP_WANTARRAY
493 defined $a ; # OP_DEFINED
496 length $a ; # OP_LENGTH
497 substr $a,1 ; # OP_SUBSTR
498 vec $a,1,2 ; # OP_VEC
499 index $a,1,2 ; # OP_INDEX
500 rindex $a,1,2 ; # OP_RINDEX
501 sprintf $a ; # OP_SPRINTF
505 #values %a ; # OP_VALUES
509 unpack "a", "a" ; # OP_UNPACK
510 pack $a,"" ; # OP_PACK
512 (@a)[0,1] ; # OP_LSLICE
515 sort(1,2) ; # OP_SORT
516 reverse(1,2) ; # OP_REVERSE
521 fileno STDIN ; # OP_FILENO
523 tell STDIN ; # OP_TELL
524 readlink 1; # OP_READLINK
526 localtime ; # OP_LOCALTIME
528 eval { getgrnam 1 }; # OP_GGRNAM
529 eval { getgrgid 1 }; # OP_GGRGID
530 eval { getpwnam 1 }; # OP_GPWNAM
531 eval { getpwuid 1 }; # OP_GPWUID
532 prototype "foo"; # OP_PROTOTYPE
536 use warnings 'void' ;
537 for (@{[0]}) { "$_" } # check warning isn't duplicated
539 for (@{[0]}) { "$_" } # check warning isn't duplicated
541 Useless use of string in void context at - line 3.
544 use warnings 'void' ;
547 if ( ! $Config{d_telldir}) {
550 # telldir not present
555 telldir 1 ; # OP_TELLDIR
557 telldir 1 ; # OP_TELLDIR
559 Useless use of telldir in void context at - line 13.
562 use warnings 'void' ;
565 if ( ! $Config{d_getppid}) {
568 # getppid not present
573 getppid ; # OP_GETPPID
575 getppid ; # OP_GETPPID
577 Useless use of getppid in void context at - line 13.
580 use warnings 'void' ;
583 if ( ! $Config{d_getpgrp}) {
586 # getpgrp not present
591 getpgrp ; # OP_GETPGRP
593 getpgrp ; # OP_GETPGRP
595 Useless use of getpgrp in void context at - line 13.
598 use warnings 'void' ;
601 if ( ! $Config{d_times}) {
613 Useless use of times in void context at - line 13.
616 use warnings 'void' ;
619 if ( ! $Config{d_getprior} or $^O eq 'os2') { # Locks before fixpak22
622 # getpriority not present
627 getpriority 1,2; # OP_GETPRIORITY
629 getpriority 1,2; # OP_GETPRIORITY
631 Useless use of getpriority in void context at - line 13.
634 use warnings 'void' ;
637 if ( ! $Config{d_getlogin}) {
640 # getlogin not present
645 getlogin ; # OP_GETLOGIN
647 getlogin ; # OP_GETLOGIN
649 Useless use of getlogin in void context at - line 13.
652 use warnings 'void' ;
654 if ( ! $Config{d_socket}) {
657 # getsockname not present
658 # getpeername not present
659 # gethostbyname not present
660 # gethostbyaddr not present
661 # gethostent not present
662 # getnetbyname not present
663 # getnetbyaddr not present
664 # getnetent not present
665 # getprotobyname not present
666 # getprotobynumber not present
667 # getprotoent not present
668 # getservbyname not present
669 # getservbyport not present
670 # getservent not present
674 getsockname STDIN ; # OP_GETSOCKNAME
675 getpeername STDIN ; # OP_GETPEERNAME
676 gethostbyname 1 ; # OP_GHBYNAME
677 gethostbyaddr 1,2; # OP_GHBYADDR
678 gethostent ; # OP_GHOSTENT
679 getnetbyname 1 ; # OP_GNBYNAME
680 getnetbyaddr 1,2 ; # OP_GNBYADDR
681 getnetent ; # OP_GNETENT
682 getprotobyname 1; # OP_GPBYNAME
683 getprotobynumber 1; # OP_GPBYNUMBER
684 getprotoent ; # OP_GPROTOENT
685 getservbyname 1,2; # OP_GSBYNAME
686 getservbyport 1,2; # OP_GSBYPORT
687 getservent ; # OP_GSERVENT
690 getsockname STDIN ; # OP_GETSOCKNAME
691 getpeername STDIN ; # OP_GETPEERNAME
692 gethostbyname 1 ; # OP_GHBYNAME
693 gethostbyaddr 1,2; # OP_GHBYADDR
694 gethostent ; # OP_GHOSTENT
695 getnetbyname 1 ; # OP_GNBYNAME
696 getnetbyaddr 1,2 ; # OP_GNBYADDR
697 getnetent ; # OP_GNETENT
698 getprotobyname 1; # OP_GPBYNAME
699 getprotobynumber 1; # OP_GPBYNUMBER
700 getprotoent ; # OP_GPROTOENT
701 getservbyname 1,2; # OP_GSBYNAME
702 getservbyport 1,2; # OP_GSBYPORT
703 getservent ; # OP_GSERVENT
705 # some functions may not be there, so we exit without running
709 Useless use of getsockname in void context at - line 24.
710 Useless use of getpeername in void context at - line 25.
711 Useless use of gethostbyname in void context at - line 26.
712 Useless use of gethostbyaddr in void context at - line 27.
713 Useless use of gethostent in void context at - line 28.
714 Useless use of getnetbyname in void context at - line 29.
715 Useless use of getnetbyaddr in void context at - line 30.
716 Useless use of getnetent in void context at - line 31.
717 Useless use of getprotobyname in void context at - line 32.
718 Useless use of getprotobynumber in void context at - line 33.
719 Useless use of getprotoent in void context at - line 34.
720 Useless use of getservbyname in void context at - line 35.
721 Useless use of getservbyport in void context at - line 36.
722 Useless use of getservent in void context at - line 37.
725 use warnings 'void' ;
736 Useless use of a variable in void context at - line 3.
737 Useless use of a variable in void context at - line 4.
738 Useless use of a variable in void context at - line 5.
739 Useless use of a variable in void context at - line 6.
742 use warnings 'void' ;
745 "x" . "y"; # optimized to OP_CONST
746 2 + 2; # optimized to OP_CONST
747 use constant U => undef;
750 5 || print "bad\n"; # test OPpCONST_SHORTCIRCUIT
751 print "boo\n" if U; # test OPpCONST_SHORTCIRCUIT
752 if($foo){}elsif(""){} # test OPpCONST_SHORTCIRCUIT
756 "x" . "y"; # optimized to OP_CONST
757 2 + 2; # optimized to OP_CONST
759 Useless use of a constant ("abc") in void context at - line 3.
760 Useless use of a constant (7) in void context at - line 4.
761 Useless use of a constant ("xy") in void context at - line 5.
762 Useless use of a constant (4) in void context at - line 6.
763 Useless use of a constant (undef) in void context at - line 8.
764 Useless use of a constant ("\"\t\n") in void context at - line 9.
768 use open qw( :utf8 :std );
769 use warnings 'void' ;
771 "Ẋ" . "ƴ"; # optimized to OP_CONST
772 FOO; # Bareword optimized to OP_CONST
773 use constant ů => undef;
775 5 || print "bad\n"; # test OPpCONST_SHORTCIRCUIT
776 print "boo\n" if ů; # test OPpCONST_SHORTCIRCUIT
779 "Ẋ" . "ƴ"; # optimized to OP_CONST
781 Useless use of a constant ("\340\x{1e06}c") in void context at - line 5.
782 Useless use of a constant ("\x{1e8a}\x{1b4}") in void context at - line 6.
783 Useless use of a constant ("\x{ff26}\x{ff2f}\x{ff2f}") in void context at - line 7.
784 Useless use of a constant (undef) in void context at - line 9.
788 use warnings 'misc' ; use utf8;
789 my $a ; my @a = () ; my %a = () ; my $b = \@a ; my $c = \%a ;my $d = 'test';
809 my $a ; my @a = () ; my %a = () ; my $b = \@a ; my $c = \%a ; my $d = 'test';
827 Applying pattern match (m//) to @a will act on scalar(@a) at - line 5.
828 Applying substitution (s///) to @a2 will act on scalar(@a2) at - line 6.
829 Applying transliteration (tr///) to @a3 will act on scalar(@a3) at - line 7.
830 Applying pattern match (m//) to @array will act on scalar(@array) at - line 8.
831 Applying substitution (s///) to @array will act on scalar(@array) at - line 9.
832 Applying transliteration (tr///) to @array will act on scalar(@array) at - line 10.
833 Applying pattern match (m//) to %a will act on scalar(%a) at - line 11.
834 Applying substitution (s///) to %a2 will act on scalar(%a2) at - line 12.
835 Applying transliteration (tr///) to %a3 will act on scalar(%a3) at - line 13.
836 Applying pattern match (m//) to %hash will act on scalar(%hash) at - line 14.
837 Applying substitution (s///) to %hash will act on scalar(%hash) at - line 15.
838 Applying transliteration (tr///) to %hash will act on scalar(%hash) at - line 16.
839 Useless use of /d modifier in transliteration operator at - line 17.
840 Replacement list is longer than search list at - line 18.
841 Useless use of /d modifier in transliteration operator at - line 20.
842 Replacement list is longer than search list at - line 21.
843 Can't modify array dereference in substitution (s///) at - line 6, near "s/a/b/ ;"
844 BEGIN not safe after errors--compilation aborted at - line 23.
847 use warnings 'parenthesis' ;
849 my @foo,%bar, $quux; # there's a TAB here
851 no warnings 'parenthesis' ;
854 Parentheses missing around "my" list at - line 3.
855 Parentheses missing around "my" list at - line 4.
858 use warnings 'parenthesis' ;
860 no warnings 'parenthesis' ;
863 Parentheses missing around "our" list at - line 3.
866 use warnings 'parenthesis' ;
867 local $a, $b = (1,2);
869 no warnings 'parenthesis' ;
870 local $c, $d = (1,2);
872 Parentheses missing around "local" list at - line 3.
873 Parentheses missing around "local" list at - line 4.
876 use warnings 'bareword' ;
878 no warnings 'bareword' ;
881 Bareword found in conditional at - line 3.
887 use warnings 'misc' ;
889 $x = 1 if $x = <FH> ;
893 $x = 1 if $x = <FH> ;
897 Value of <HANDLE> construct can be "0"; test with defined() at - line 4.
898 Value of <HANDLE> construct can be "0"; test with defined() at - line 5.
901 use warnings 'misc' ;
903 $x = 1 if $x = readdir FH ;
907 $x = 1 if $x = readdir FH ;
912 Value of readdir() operator can be "0"; test with defined() at - line 4.
913 Value of readdir() operator can be "0"; test with defined() at - line 5.
916 use warnings 'misc' ;
925 Value of glob construct can be "0"; test with defined() at - line 3.
926 Value of glob construct can be "0"; test with defined() at - line 4.
929 use warnings 'misc' ;
931 $x = 1 if $x = each %a ;
933 $x = 1 if $x = each %a ;
935 Value of each() operator can be "0"; test with defined() at - line 4.
938 use warnings 'misc' ;
939 $x = 1 while $x = <*> and 0 ;
941 $x = 1 while $x = <*> and 0 ;
943 Value of glob construct can be "0"; test with defined() at - line 3.
946 use warnings 'misc' ;
948 $x = 1 while $x = readdir FH and 0 ;
950 $x = 1 while $x = readdir FH and 0 ;
953 Value of readdir() operator can be "0"; test with defined() at - line 4.
958 ($_ = <FH>) // ($_ = 1);
964 use warnings 'redefine' ;
967 sub fred { # warning should be for this line
969 no warnings 'redefine' ;
974 Subroutine fred redefined at - line 4.
975 Subroutine fred redefined at - line 5.
978 use warnings 'redefine' ;
981 no warnings 'redefine' ;
984 Constant subroutine fred redefined at - line 4.
990 Constant subroutine fred redefined at - line 3.
994 *fred = sub () { 2 };
996 Constant subroutine main::fred redefined at - line 3.
999 use feature "lexical_subs", "state";
1000 my sub fred () { 1 }
1003 sub george () { 2 } # should *not* produce redef warnings by default
1004 state sub phred () { 1 }
1006 state sub jorge { 1 }
1007 sub jorge () { 2 } # should *not* produce redef warnings by default
1009 The lexical_subs feature is experimental at - line 3.
1010 Prototype mismatch: sub fred () vs none at - line 4.
1011 Constant subroutine fred redefined at - line 4.
1012 The lexical_subs feature is experimental at - line 5.
1013 Prototype mismatch: sub george: none vs () at - line 6.
1014 The lexical_subs feature is experimental at - line 7.
1015 Prototype mismatch: sub phred () vs none at - line 8.
1016 Constant subroutine phred redefined at - line 8.
1017 The lexical_subs feature is experimental at - line 9.
1018 Prototype mismatch: sub jorge: none vs () at - line 10.
1021 no warnings 'redefine' ;
1027 no warnings 'redefine' ;
1029 *fred = sub () { 2 };
1033 use warnings 'redefine' ;
1038 no warnings 'redefine' ;
1042 Format FRED redefined at - line 5.
1044 # op.c [Perl_ck_fun]
1051 no warnings 'experimental::autoderef' ;
1058 push on reference is experimental at - line 3.
1059 pop on reference is experimental at - line 4.
1060 shift on reference is experimental at - line 5.
1061 unshift on reference is experimental at - line 6.
1062 splice on reference is experimental at - line 7.
1065 use warnings 'exec' ;
1069 Statement unlikely to be reached at - line 4.
1070 (Maybe you meant system() when you said exec()?)
1072 # op.c, no warning if exec isn't a statement.
1073 use warnings 'exec' ;
1074 $a || exec "$^X -e 1" ;
1082 Can't use 'defined(@array)' (Maybe you should just omit the defined()?) at - line 2.
1088 Can't use 'defined(@array)' (Maybe you should just omit the defined()?) at - line 2.
1091 defined(@a = (1,2,3));
1098 Can't use 'defined(%hash)' (Maybe you should just omit the defined()?) at - line 2.
1104 Can't use 'defined(%hash)' (Maybe you should just omit the defined()?) at - line 2.
1107 no warnings 'exec' ;
1116 use constant foo=>bar; sub foo(@);
1117 use constant bav=>bar; sub bav(); # no warning
1120 Prototype mismatch: sub main::fred () vs ($) at - line 3.
1121 Prototype mismatch: sub foo () vs (@) at - line 4.
1122 Prototype mismatch: sub btu: none vs () at - line 6.
1126 use open qw( :utf8 :std );
1130 Prototype mismatch: sub main::frèd () vs ($) at - line 5.
1134 use open qw( :utf8 :std );
1136 eval "sub fòò (@\$\0) {}";
1138 Prototype after '@' for main::fòò : @$\0 at (eval 1) line 1.
1139 Illegal character in prototype for main::fòò : @$\0 at (eval 1) line 1.
1143 use open qw( :utf8 :std );
1145 eval "sub foo (@\0) {}";
1147 Prototype after '@' for main::foo : @\0 at (eval 1) line 1.
1148 Illegal character in prototype for main::foo : @\0 at (eval 1) line 1.
1152 use open qw( :utf8 :std );
1154 BEGIN { $::{"foo"} = "\@\$\0L\351on" }
1155 BEGIN { eval "sub foo (@\$\0L\x{c3}\x{a9}on) {}"; }
1157 Prototype after '@' for main::foo : @$\x{0}L... at (eval 1) line 1.
1158 Illegal character in prototype for main::foo : @$\x{0}L... at (eval 1) line 1.
1162 use open qw( :utf8 :std );
1164 BEGIN { eval "sub foo (@\0) {}"; }
1166 Prototype after '@' for main::foo : @\0 at (eval 1) line 1.
1167 Illegal character in prototype for main::foo : @\0 at (eval 1) line 1.
1171 eval "sub foo (@\xAB) {}";
1173 Prototype after '@' for main::foo : @\x{ab} at (eval 1) line 1.
1174 Illegal character in prototype for main::foo : @\x{ab} at (eval 1) line 1.
1178 use open qw( :utf8 :std );
1180 BEGIN { eval "sub foo (@\x{30cb}) {}"; }
1182 Prototype after '@' for main::foo : @\x{30cb} at (eval 1) line 1.
1183 Illegal character in prototype for main::foo : @\x{30cb} at (eval 1) line 1.
1187 use open qw( :utf8 :std );
1189 BEGIN { $::{"foo"} = "\x{30cb}" }
1190 BEGIN { eval "sub foo {}"; }
1192 Prototype mismatch: sub main::foo (ニ) vs none at (eval 1) line 1.
1199 no warnings 'prototype' ;
1202 use warnings 'prototype' ;
1209 Prototype mismatch: sub main::fred () vs ($) at - line 4.
1210 Prototype mismatch: sub main::freD () vs ($) at - line 11.
1211 Prototype mismatch: sub main::FRED () vs ($) at - line 14.
1213 # op.c [S_simplify_sort]
1215 my @tests = split /^/, '
1216 sort {$a <=> $b} @a;
1217 sort {$a cmp $b} @a;
1218 { use integer; sort {$a <=> $b} @a}
1219 sort {$b <=> $a} @a;
1220 sort {$b cmp $a} @a;
1221 { use integer; sort {$b <=> $a} @a}
1223 for my $pragma ('use warnings "syntax";', '') {
1224 for my $vars ('', 'my $a;', 'my $b;', 'my ($a,$b);') {
1225 for my $inner_stmt ('', 'print;', 'func();') {
1226 eval "#line " . ++$line . "01 -\n$pragma\n$vars"
1227 . join "", map s/sort \{\K/$inner_stmt/r, @tests;
1233 use warnings 'syntax';
1235 # These used to be errors!
1236 sort { ; } $a <=> $b;
1237 sort { ; } $a, "<=>";
1238 sort { ; } $a, $cmp;
1239 sort $a, $b if $cmpany_name;
1243 "my $a" used in sort comparison at - line 403.
1244 "my $a" used in sort comparison at - line 404.
1245 "my $a" used in sort comparison at - line 405.
1246 "my $a" used in sort comparison at - line 406.
1247 "my $a" used in sort comparison at - line 407.
1248 "my $a" used in sort comparison at - line 408.
1249 "my $a" used in sort comparison at - line 503.
1250 "my $a" used in sort comparison at - line 504.
1251 "my $a" used in sort comparison at - line 505.
1252 "my $a" used in sort comparison at - line 506.
1253 "my $a" used in sort comparison at - line 507.
1254 "my $a" used in sort comparison at - line 508.
1255 "my $a" used in sort comparison at - line 603.
1256 "my $a" used in sort comparison at - line 604.
1257 "my $a" used in sort comparison at - line 605.
1258 "my $a" used in sort comparison at - line 606.
1259 "my $a" used in sort comparison at - line 607.
1260 "my $a" used in sort comparison at - line 608.
1261 "my $b" used in sort comparison at - line 703.
1262 "my $b" used in sort comparison at - line 704.
1263 "my $b" used in sort comparison at - line 705.
1264 "my $b" used in sort comparison at - line 706.
1265 "my $b" used in sort comparison at - line 707.
1266 "my $b" used in sort comparison at - line 708.
1267 "my $b" used in sort comparison at - line 803.
1268 "my $b" used in sort comparison at - line 804.
1269 "my $b" used in sort comparison at - line 805.
1270 "my $b" used in sort comparison at - line 806.
1271 "my $b" used in sort comparison at - line 807.
1272 "my $b" used in sort comparison at - line 808.
1273 "my $b" used in sort comparison at - line 903.
1274 "my $b" used in sort comparison at - line 904.
1275 "my $b" used in sort comparison at - line 905.
1276 "my $b" used in sort comparison at - line 906.
1277 "my $b" used in sort comparison at - line 907.
1278 "my $b" used in sort comparison at - line 908.
1279 "my $a" used in sort comparison at - line 1003.
1280 "my $b" used in sort comparison at - line 1003.
1281 "my $a" used in sort comparison at - line 1004.
1282 "my $b" used in sort comparison at - line 1004.
1283 "my $a" used in sort comparison at - line 1005.
1284 "my $b" used in sort comparison at - line 1005.
1285 "my $b" used in sort comparison at - line 1006.
1286 "my $a" used in sort comparison at - line 1006.
1287 "my $b" used in sort comparison at - line 1007.
1288 "my $a" used in sort comparison at - line 1007.
1289 "my $b" used in sort comparison at - line 1008.
1290 "my $a" used in sort comparison at - line 1008.
1291 "my $a" used in sort comparison at - line 1103.
1292 "my $b" used in sort comparison at - line 1103.
1293 "my $a" used in sort comparison at - line 1104.
1294 "my $b" used in sort comparison at - line 1104.
1295 "my $a" used in sort comparison at - line 1105.
1296 "my $b" used in sort comparison at - line 1105.
1297 "my $b" used in sort comparison at - line 1106.
1298 "my $a" used in sort comparison at - line 1106.
1299 "my $b" used in sort comparison at - line 1107.
1300 "my $a" used in sort comparison at - line 1107.
1301 "my $b" used in sort comparison at - line 1108.
1302 "my $a" used in sort comparison at - line 1108.
1303 "my $a" used in sort comparison at - line 1203.
1304 "my $b" used in sort comparison at - line 1203.
1305 "my $a" used in sort comparison at - line 1204.
1306 "my $b" used in sort comparison at - line 1204.
1307 "my $a" used in sort comparison at - line 1205.
1308 "my $b" used in sort comparison at - line 1205.
1309 "my $b" used in sort comparison at - line 1206.
1310 "my $a" used in sort comparison at - line 1206.
1311 "my $b" used in sort comparison at - line 1207.
1312 "my $a" used in sort comparison at - line 1207.
1313 "my $b" used in sort comparison at - line 1208.
1314 "my $a" used in sort comparison at - line 1208.
1316 # op.c [S_simplify_sort]
1317 use warnings 'syntax'; use 5.01;
1319 sort { $a <=> $b } ();
1321 "state $a" used in sort comparison at - line 4.
1323 # op.c [Perl_ck_cmp]
1324 use warnings 'syntax' ;
1325 no warnings 'deprecated';
1362 $[ used in numeric lt (<) (did you mean $] ?) at - line 4.
1363 $[ used in numeric gt (>) (did you mean $] ?) at - line 5.
1364 $[ used in numeric le (<=) (did you mean $] ?) at - line 6.
1365 $[ used in numeric ge (>=) (did you mean $] ?) at - line 7.
1366 $[ used in numeric lt (<) (did you mean $] ?) at - line 8.
1367 $[ used in numeric gt (>) (did you mean $] ?) at - line 9.
1368 $[ used in numeric le (<=) (did you mean $] ?) at - line 10.
1369 $[ used in numeric ge (>=) (did you mean $] ?) at - line 11.
1370 $[ used in numeric lt (<) (did you mean $] ?) at - line 13.
1371 $[ used in numeric gt (>) (did you mean $] ?) at - line 14.
1372 $[ used in numeric le (<=) (did you mean $] ?) at - line 15.
1373 $[ used in numeric ge (>=) (did you mean $] ?) at - line 16.
1374 $[ used in numeric lt (<) (did you mean $] ?) at - line 17.
1375 $[ used in numeric gt (>) (did you mean $] ?) at - line 18.
1376 $[ used in numeric le (<=) (did you mean $] ?) at - line 19.
1377 $[ used in numeric ge (>=) (did you mean $] ?) at - line 20.
1379 # op.c [Perl_ck_each]
1384 no warnings 'experimental::autoderef' ;
1389 keys on reference is experimental at - line 3.
1390 values on reference is experimental at - line 4.
1391 each on reference is experimental at - line 5.
1393 # op.c [Perl_ck_length]
1394 use warnings 'syntax' ;
1403 length() used on @a (did you mean "scalar(@a)"?) at - line 3.
1404 length() used on %b (did you mean "scalar(keys %b)"?) at - line 4.
1405 length() used on @array (did you mean "scalar(@array)"?) at - line 5.
1406 length() used on %hash (did you mean "scalar(keys %hash)"?) at - line 6.
1407 length() used on %h (did you mean "scalar(keys %h)"?) at - line 8.
1408 length() used on @g (did you mean "scalar(@g)"?) at - line 9.
1411 use warnings 'syntax' ;
1412 join /---/, 'x', 'y', 'z';
1414 /---/ should probably be written as "---" at - line 3.
1418 use open qw( :utf8 :std );
1419 use warnings 'syntax' ;
1420 join /~~~/, 'x', 'y', 'z';
1422 /~~~/ should probably be written as "~~~" at - line 5.
1425 use warnings 'prototype' ;
1428 no warnings 'prototype' ;
1432 main::fred() called too early to check prototype at - line 3.
1434 # op.c [Perl_newATTRSUB]
1436 use warnings 'void' ;
1437 BEGIN { $| = 1; print "in begin\n"; }
1438 CHECK { print "in check\n"; }
1439 INIT { print "in init\n"; }
1440 END { print "in end\n"; }
1441 print "in mainline\n";
1445 delete $INC{"abc.pm"};
1454 Too late to run CHECK block at abc.pm line 3.
1455 Too late to run INIT block at abc.pm line 4.
1458 Too late to run CHECK block at abc.pm line 3.
1459 Too late to run INIT block at abc.pm line 4.
1465 # op.c [Perl_newATTRSUB]
1467 no warnings 'void' ;
1468 BEGIN { $| = 1; print "in begin\n"; }
1469 CHECK { print "in check\n"; }
1470 INIT { print "in init\n"; }
1471 END { print "in end\n"; }
1472 print "in mainline\n";
1487 use warnings 'syntax' ;
1490 no warnings 'syntax' ;
1494 Useless use of push with no values at - line 4.
1495 Useless use of unshift with no values at - line 5.
1498 # 20020401 mjd@plover.com at suggestion of jfriedl@yahoo.com
1499 use warnings 'regexp';
1500 split /blah/g, "blah";
1501 no warnings 'regexp';
1502 split /blah/g, "blah";
1504 Use of /g modifier is meaningless in split at - line 4.
1506 use feature "bitwise";
1521 use warnings "experimental::bitwise";
1536 no warnings "experimental::bitwise";
1552 The bitwise feature is experimental at - line 2.
1553 The bitwise feature is experimental at - line 3.
1554 The bitwise feature is experimental at - line 4.
1555 The bitwise feature is experimental at - line 5.
1556 The bitwise feature is experimental at - line 6.
1557 The bitwise feature is experimental at - line 7.
1558 The bitwise feature is experimental at - line 8.
1559 The bitwise feature is experimental at - line 9.
1560 The bitwise feature is experimental at - line 10.
1561 The bitwise feature is experimental at - line 11.
1562 The bitwise feature is experimental at - line 12.
1563 The bitwise feature is experimental at - line 13.
1564 The bitwise feature is experimental at - line 14.
1565 The bitwise feature is experimental at - line 15.
1566 The bitwise feature is experimental at - line 17.
1567 The bitwise feature is experimental at - line 18.
1568 The bitwise feature is experimental at - line 19.
1569 The bitwise feature is experimental at - line 20.
1570 The bitwise feature is experimental at - line 21.
1571 The bitwise feature is experimental at - line 22.
1572 The bitwise feature is experimental at - line 23.
1573 The bitwise feature is experimental at - line 24.
1574 The bitwise feature is experimental at - line 25.
1575 The bitwise feature is experimental at - line 26.
1576 The bitwise feature is experimental at - line 27.
1577 The bitwise feature is experimental at - line 28.
1578 The bitwise feature is experimental at - line 29.
1579 The bitwise feature is experimental at - line 30.
1582 use warnings 'precedence';
1589 $a = $b <=> $c & $d;
1590 $a &= $b == $c; $a |= $b == $c; $a ^= $b == $c; # shouldn't warn
1591 no warnings 'precedence';
1598 $a = $b <=> $c & $d;
1600 Possible precedence problem on bitwise & operator at - line 3.
1601 Possible precedence problem on bitwise ^ operator at - line 4.
1602 Possible precedence problem on bitwise | operator at - line 5.
1603 Possible precedence problem on bitwise & operator at - line 6.
1604 Possible precedence problem on bitwise ^ operator at - line 7.
1605 Possible precedence problem on bitwise | operator at - line 8.
1606 Possible precedence problem on bitwise & operator at - line 9.
1610 use warnings 'precedence';
1617 $a = $b <=> $c & $d;
1618 no warnings 'precedence';
1625 $a = $b <=> $c & $d;
1627 Possible precedence problem on bitwise & operator at - line 4.
1628 Possible precedence problem on bitwise ^ operator at - line 5.
1629 Possible precedence problem on bitwise | operator at - line 6.
1630 Possible precedence problem on bitwise & operator at - line 7.
1631 Possible precedence problem on bitwise ^ operator at - line 8.
1632 Possible precedence problem on bitwise | operator at - line 9.
1633 Possible precedence problem on bitwise & operator at - line 10.
1637 # ok => local() has desired effect;
1638 # ignore=> local() silently ignored
1640 use warnings 'syntax';
1642 local(undef); # OP_UNDEF ignore
1643 sub lval : lvalue {};
1644 local(lval()); # OP_ENTERSUB
1645 local($x **= 1); # OP_POW
1646 local($x *= 1); # OP_MULTIPLY
1647 local($x /= 1); # OP_DIVIDE
1648 local($x %= 1); # OP_MODULO
1649 local($x x= 1); # OP_REPEAT
1650 local($x += 1); # OP_ADD
1651 local($x -= 1); # OP_SUBTRACT
1652 local($x .= 1); # OP_CONCAT
1653 local($x <<= 1); # OP_LEFT_SHIFT
1654 local($x >>= 1); # OP_RIGHT_SHIFT
1655 local($x &= 1); # OP_BIT_AND
1656 local($x ^= 1); # OP_BIT_XOR
1657 local($x |= 1); # OP_BIT_OR
1660 local($x *= 1); # OP_I_MULTIPLY
1661 local($x /= 1); # OP_I_DIVIDE
1662 local($x %= 1); # OP_I_MODULO
1663 local($x += 1); # OP_I_ADD
1664 local($x -= 1); # OP_I_SUBTRACT
1666 local($x?$y:$z) = 1; # OP_COND_EXPR ok
1667 # these two are fatal run-time errors instead
1668 #local(@$a); # OP_RV2AV ok
1669 #local(%$a); # OP_RV2HV ok
1670 local(*a); # OP_RV2GV ok
1671 local(@a[1,2]); # OP_ASLICE ok
1672 local(@a{1,2}); # OP_HSLICE ok
1673 local(@a = (1,2)); # OP_AASSIGN
1674 local($$x); # OP_RV2SV ok
1675 local($#a); # OP_AV2ARYLEN
1676 local($x = 1); # OP_SASSIGN
1677 local($x &&= 1); # OP_ANDASSIGN
1678 local($x ||= 1); # OP_ORASSIGN
1679 local($x //= 1); # OP_DORASSIGN
1680 local($a[0]); # OP_AELEMFAST ok
1682 local(substr($x,0,1)); # OP_SUBSTR
1683 local(pos($x)); # OP_POS
1684 local(vec($x,0,1)); # OP_VEC
1685 local($a[$b]); # OP_AELEM ok
1686 local($a{$b}); # OP_HELEM ok
1688 no warnings 'syntax';
1690 Useless localization of subroutine entry at - line 10.
1691 Useless localization of exponentiation (**) at - line 11.
1692 Useless localization of multiplication (*) at - line 12.
1693 Useless localization of division (/) at - line 13.
1694 Useless localization of modulus (%) at - line 14.
1695 Useless localization of repeat (x) at - line 15.
1696 Useless localization of addition (+) at - line 16.
1697 Useless localization of subtraction (-) at - line 17.
1698 Useless localization of concatenation (.) or string at - line 18.
1699 Useless localization of left bitshift (<<) at - line 19.
1700 Useless localization of right bitshift (>>) at - line 20.
1701 Useless localization of bitwise and (&) at - line 21.
1702 Useless localization of bitwise xor (^) at - line 22.
1703 Useless localization of bitwise or (|) at - line 23.
1704 Useless localization of integer multiplication (*) at - line 26.
1705 Useless localization of integer division (/) at - line 27.
1706 Useless localization of integer modulus (%) at - line 28.
1707 Useless localization of integer addition (+) at - line 29.
1708 Useless localization of integer subtraction (-) at - line 30.
1709 Useless localization of list assignment at - line 39.
1710 Useless localization of array length at - line 41.
1711 Useless localization of scalar assignment at - line 42.
1712 Useless localization of logical and assignment (&&=) at - line 43.
1713 Useless localization of logical or assignment (||=) at - line 44.
1714 Useless localization of defined or assignment (//=) at - line 45.
1715 Useless localization of substr at - line 48.
1716 Useless localization of match position at - line 49.
1717 Useless localization of vec at - line 50.
1724 my ($x5,@x6, %x7) if 0;
1727 # these shouldn't warn
1731 if (my $w2) { $a=1 }
1732 if ($a && (my $w3 = 1)) {$a = 2}
1735 Deprecated use of my() in false conditional at - line 2.
1736 Deprecated use of my() in false conditional at - line 3.
1737 Deprecated use of my() in false conditional at - line 4.
1738 Deprecated use of my() in false conditional at - line 5.
1739 Deprecated use of my() in false conditional at - line 6.
1740 Deprecated use of my() in false conditional at - line 7.
1741 Deprecated use of my() in false conditional at - line 8.
1746 use warnings 'deprecated';
1749 no warnings 'deprecated';
1753 Use of assignment to $[ is deprecated at - line 2.
1754 Use of assignment to $[ is deprecated at - line 3.
1755 Use of assignment to $[ is deprecated at - line 5.
1756 Use of assignment to $[ is deprecated at - line 6.
1759 use warnings 'void';
1760 @x = split /y/, "z";
1761 $x = split /y/, "z";
1764 @x = split /y/, "z";
1765 $x = split /y/, "z";
1768 Useless use of split in void context at - line 5.
1771 use warnings 'redefine' ;
1773 use open qw( :utf8 :std );
1776 no warnings 'redefine' ;
1779 Subroutine frèd redefined at - line 6.
1782 use warnings 'redefine' ;
1784 use open qw( :utf8 :std );
1787 no warnings 'redefine' ;
1790 Constant subroutine frèd redefined at - line 6.
1794 use open qw( :utf8 :std );
1798 Constant subroutine frèd redefined at - line 5.
1802 use open qw( :utf8 :std );
1804 *frèd = sub () { 2 };
1806 Constant subroutine main::frèd redefined at - line 5.
1809 use warnings 'redefine' ;
1811 use open qw( :utf8 :std );
1814 no warnings 'redefine' ;
1817 Subroutine ᚠርƊ redefined at - line 6.
1820 use warnings 'redefine' ;
1822 use open qw( :utf8 :std );
1825 no warnings 'redefine' ;
1828 Constant subroutine ᚠርƊ redefined at - line 6.
1832 use open qw( :utf8 :std );
1836 Constant subroutine ᚠርƊ redefined at - line 5.
1840 use open qw( :utf8 :std );
1842 *ᚠርƊ = sub () { 2 };
1844 Constant subroutine main::ᚠርƊ redefined at - line 5.
1847 sub DynaLoader::dl_error {};
1849 # We're testing that the warnings report the same line number:
1850 eval <<'EOC' or die $@;
1852 DynaLoader::boot_DynaLoader("DynaLoader");
1855 eval <<'EOC' or die $@;
1857 DynaLoader::boot_DynaLoader("DynaLoader");
1863 \ASubroutine DynaLoader::dl_error redefined at \(eval 1\) line 2\.
1865 Subroutine DynaLoader::dl_error redefined at \(eval 2\) line 2\.
1869 sub do_warn_1 { return $a or $b; }
1870 sub do_warn_2 { return $a and $b; }
1871 sub do_warn_3 { return $a xor $b; }
1872 sub do_warn_4 { die $a or $b; }
1873 sub do_warn_5 { die $a and $b; }
1874 sub do_warn_6 { die $a xor $b; }
1875 sub do_warn_7 { exit $a or $b; }
1876 sub do_warn_8 { exit $a and $b; }
1877 sub do_warn_9 { exit $a xor $b; }
1879 # Since exit is an unary operator, it is even stronger than
1881 sub do_warn_10 { exit $a || $b; }
1882 sub do_warn_11 { exit $a && $b; }
1884 sub do_warn_12 { goto $a or $b; }
1885 sub do_warn_13 { goto $a and $b; }
1886 sub do_warn_14 { goto $a xor $b; }
1887 sub do_warn_15 { next $a or $b while(1); }
1888 sub do_warn_16 { next $a and $b while(1); }
1889 sub do_warn_17 { next $a xor $b while(1); }
1890 sub do_warn_18 { last $a or $b while(1); }
1891 sub do_warn_19 { last $a and $b while(1); }
1892 sub do_warn_20 { last $a xor $b while(1); }
1893 sub do_warn_21 { redo $a or $b while(1); }
1894 sub do_warn_22 { redo $a and $b while(1); }
1895 sub do_warn_23 { redo $a xor $b while(1); }
1896 # These get re-written to "(return/die $a) and $b"
1897 sub do_warn_24 { $b if return $a; }
1898 sub do_warn_25 { $b if die $a; }
1900 Possible precedence issue with control flow operator at - line 3.
1901 Possible precedence issue with control flow operator at - line 4.
1902 Possible precedence issue with control flow operator at - line 5.
1903 Possible precedence issue with control flow operator at - line 6.
1904 Possible precedence issue with control flow operator at - line 7.
1905 Possible precedence issue with control flow operator at - line 8.
1906 Possible precedence issue with control flow operator at - line 9.
1907 Possible precedence issue with control flow operator at - line 10.
1908 Possible precedence issue with control flow operator at - line 11.
1909 Possible precedence issue with control flow operator at - line 15.
1910 Possible precedence issue with control flow operator at - line 16.
1911 Possible precedence issue with control flow operator at - line 18.
1912 Possible precedence issue with control flow operator at - line 19.
1913 Possible precedence issue with control flow operator at - line 20.
1914 Possible precedence issue with control flow operator at - line 21.
1915 Possible precedence issue with control flow operator at - line 22.
1916 Possible precedence issue with control flow operator at - line 23.
1917 Possible precedence issue with control flow operator at - line 24.
1918 Possible precedence issue with control flow operator at - line 25.
1919 Possible precedence issue with control flow operator at - line 26.
1920 Possible precedence issue with control flow operator at - line 27.
1921 Possible precedence issue with control flow operator at - line 28.
1922 Possible precedence issue with control flow operator at - line 29.
1923 Possible precedence issue with control flow operator at - line 31.
1924 Possible precedence issue with control flow operator at - line 32.
1927 # (same as above, except these should not warn)
1928 use constant FEATURE => 1;
1929 use constant MISSING_FEATURE => 0;
1931 sub dont_warn_1 { MISSING_FEATURE and return or dont_warn_3(); }
1932 sub dont_warn_2 { FEATURE || return and dont_warn_3(); }
1933 sub dont_warn_3 { not FEATURE and return or dont_warn_3(); }
1934 sub dont_warn_4 { !MISSING_FEATURE || return and dont_warn_3(); }
1935 sub dont_warn_5 { MISSING_FEATURE and die or dont_warn_3(); }
1936 sub dont_warn_6 { FEATURE || die and dont_warn_3(); }
1937 sub dont_warn_7 { not FEATURE and die or dont_warn_3(); }
1938 sub dont_warn_8 { !MISSING_FEATURE || die and dont_warn_3(); }
1939 sub dont_warn_9 { MISSING_FEATURE and goto $a or dont_warn_3(); }
1940 sub dont_warn_10 { FEATURE || goto $a and dont_warn_3(); }
1941 sub dont_warn_11 { not FEATURE and goto $a or dont_warn_3(); }
1942 sub dont_warn_12 { !MISSING_FEATURE || goto $a and dont_warn_3(); }
1944 sub dont_warn_13 { MISSING_FEATURE and exit $a or dont_warn_3(); }
1945 sub dont_warn_14 { FEATURE || exit $a and dont_warn_3(); }
1946 sub dont_warn_15 { not FEATURE and exit $a or dont_warn_3(); }
1947 sub dont_warn_16 { !MISSING_FEATURE || exit $a and dont_warn_3(); }
1949 sub dont_warn_17 { MISSING_FEATURE and next or dont_warn_3() while(1); }
1950 sub dont_warn_18 { FEATURE || next and dont_warn_3() while(1); }
1951 sub dont_warn_19 { not FEATURE and next or dont_warn_3() while(1); }
1952 sub dont_warn_20 { !MISSING_FEATURE || next and dont_warn_3() while(1); }
1953 sub dont_warn_21 { MISSING_FEATURE and redo or dont_warn_3() while(1); }
1954 sub dont_warn_22 { FEATURE || redo and dont_warn_3() while(1); }
1955 sub dont_warn_23 { not FEATURE and redo or dont_warn_3() while(1); }
1956 sub dont_warn_24 { !MISSING_FEATURE || redo and dont_warn_3() while(1); }
1957 sub dont_warn_25 { MISSING_FEATURE and last or dont_warn_3() while(1); }
1958 sub dont_warn_26 { FEATURE || last and dont_warn_3() while(1); }
1959 sub dont_warn_27 { not FEATURE and last or dont_warn_3() while(1); }
1960 sub dont_warn_28 { !MISSING_FEATURE || last and dont_warn_3() while(1); }
1962 # These are weird, but at least not ambiguous.
1963 sub dont_warn_29 { return ($a or $b); }
1964 sub dont_warn_30 { return ($a and $b); }
1965 sub dont_warn_31 { return ($a xor $b); }
1966 sub dont_warn_32 { die ($a or $b); }
1967 sub dont_warn_33 { die ($a and $b); }
1968 sub dont_warn_34 { die ($a xor $b); }
1969 sub dont_warn_35 { goto ($a or $b); }
1970 sub dont_warn_36 { goto ($a and $b); }
1971 sub dont_warn_37 { goto ($a xor $b); }
1972 sub dont_warn_38 { next ($a or $b) while(1); }
1973 sub dont_warn_39 { next ($a and $b) while(1); }
1974 sub dont_warn_40 { next ($a xor $b) while(1); }
1975 sub dont_warn_41 { last ($a or $b) while(1); }
1976 sub dont_warn_42 { last ($a and $b) while(1); }
1977 sub dont_warn_43 { last ($a xor $b) while(1); }
1978 sub dont_warn_44 { redo ($a or $b) while(1); }
1979 sub dont_warn_45 { redo ($a and $b) while(1); }
1980 sub dont_warn_46 { redo ($a xor $b) while(1); }
1983 use feature "signatures";
1987 $bbb = sub ($a) { 4 };
1989 The signatures feature is experimental at - line 3.
1990 The signatures feature is experimental at - line 5.
1992 no warnings "experimental::signatures";
1993 use feature "signatures";
1997 $bbb = sub ($a) { 4 };
2000 use warnings 'numeric';
2004 no warnings 'numeric';
2007 no warnings 'numeric';
2009 Negative repeat count does nothing at - line 3.
2010 Negative repeat count does nothing at - line 4.
2015 use warnings 'numeric';
2019 no warnings 'numeric';
2023 no warnings 'numeric';
2025 Non-finite repeat count does nothing at - line 5.
2026 Non-finite repeat count does nothing at - line 6.
2027 Non-finite repeat count does nothing at - line 7.