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 Possible precedence problem on bitwise %c operator [Perl_ck_bitop]
107 Prototype mismatch: [cv_ckproto]
111 oops: oopsAV [oopsAV] TODO
112 oops: oopsHV [oopsHV] TODO
116 use warnings 'experimental::lexical_topic' ;
119 no warnings 'experimental::lexical_topic' ;
123 Use of my $_ is experimental at - line 3.
124 Use of state $_ is experimental at - line 4.
127 use warnings 'syntax' ;
131 no warnings 'syntax' ;
136 Found = in conditional, should be == at - line 3.
137 Found = in conditional, should be == at - line 4.
140 use warnings 'syntax' ;
141 use constant foo => 1;
143 no warnings 'syntax' ;
148 use warnings 'syntax' ;
159 no warnings 'syntax' ;
163 Scalar value @a[3] better written as $a[3] at - line 3.
164 Scalar value @a{3} better written as $a{3} at - line 4.
165 Scalar value @a["]"] better written as $a["]"] at - line 5.
166 Scalar value @a{"]"} better written as $a{"]"} at - line 6.
167 Scalar value @a["}"] better written as $a["}"] at - line 7.
168 Scalar value @a{"}"} better written as $a{"}"} at - line 8.
169 Scalar value @a{...} better written as $a{...} at - line 9.
170 Scalar value @a{...} better written as $a{...} at - line 10.
171 Scalar value @a[...] better written as $a[...] at - line 11.
172 Scalar value @a[...] better written as $a[...] at - line 12.
176 use open qw( :utf8 :std );
177 use warnings 'syntax' ;
180 no warnings 'syntax' ;
184 Scalar value @à[3] better written as $à[3] at - line 5.
185 Scalar value @à{3} better written as $à{3} at - line 6.
189 use open qw( :utf8 :std );
190 use warnings 'syntax' ;
193 no warnings 'syntax' ;
197 Scalar value @ぁ[3] better written as $ぁ[3] at - line 5.
198 Scalar value @ぁ{3} better written as $ぁ{3} at - line 6.
201 # "Scalar value better written as" false positives
202 # [perl #28380] and [perl #114024]
203 use warnings 'syntax';
206 @h{qw"a b c"} = 1..3;
207 @h{qw'a b c'} = 1..3;
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; # tab before qw
216 sub foo() { qw/abc def ghi/ }
217 @X{+foo} = ( 1 .. 3 );
218 $_ = "abc"; @X{split ""} = ( 1 .. 3 );
219 my @s = @f{"}", "a"};
220 my @s = @f{"]", "a"};
228 use constant phoo => 1..3;
242 no warnings 'experimental::autoderef';
245 @h{values $foo} if 0;
249 @h[qw"a b c"] = 1..3;
250 @h[qw'a b c'] = 1..3;
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; # tab before qw
259 sub foo() { qw/abc def ghi/ }
260 @X[+foo] = ( 1 .. 3 );
261 $_ = "abc"; @X[split ""] = ( 1 .. 3 );
262 my @s = @f["}", "a"];
263 my @s = @f["]", "a"];
271 use constant phoo => 1..3;
285 no warnings 'experimental::autoderef';
288 @h[values $foo] if 0;
293 # "Scalar value better written as" should not trigger for syntax errors
294 use warnings 'syntax';
297 syntax error at - line 4, near "[]"
298 Execution of - aborted due to compilation errors.
305 Can't use a hash as a reference at - line 3.
312 Can't use a hash as a reference at - line 3.
319 Can't use an array as a reference at - line 3.
326 Can't use an array as a reference at - line 3.
330 $main::foo = {}; %$main::foo->{"bar"};
333 Can't use a hash as a reference at - line 3.
337 $foo = {}; %$foo->{"bar"};
340 Can't use a hash as a reference at - line 3.
344 $main::foo = []; @$main::foo->[34];
347 Can't use an array as a reference at - line 3.
351 $foo = []; @$foo->[34];
354 Can't use an array as a reference at - line 3.
357 use warnings 'void' ; no warnings 'experimental::smartmatch'; close STDIN ;
359 1 x 3 ; # OP_REPEAT (folded)
360 (1) x 3 ; # OP_REPEAT
362 wantarray ; # OP_WANTARRAY
372 defined $a ; # OP_DEFINED
375 length $a ; # OP_LENGTH
376 substr $a,1 ; # OP_SUBSTR
377 vec $a,1,2 ; # OP_VEC
378 index $a,1,2 ; # OP_INDEX
379 rindex $a,1,2 ; # OP_RINDEX
380 sprintf $a ; # OP_SPRINTF
384 #values %a ; # OP_VALUES
388 unpack "a", "a" ; # OP_UNPACK
389 pack $a,"" ; # OP_PACK
390 join "", @_ ; # OP_JOIN
391 (@a)[0,1] ; # OP_LSLICE
394 sort(1,2) ; # OP_SORT
395 reverse(1,2) ; # OP_REVERSE
400 fileno STDIN ; # OP_FILENO
402 tell STDIN ; # OP_TELL
403 readlink 1; # OP_READLINK
405 localtime ; # OP_LOCALTIME
407 eval { getgrnam 1 }; # OP_GGRNAM
408 eval { getgrgid 1 }; # OP_GGRGID
409 eval { getpwnam 1 }; # OP_GPWNAM
410 eval { getpwuid 1 }; # OP_GPWUID
411 prototype "foo"; # OP_PROTOTYPE
412 $a ~~ $b; # OP_SMARTMATCH
420 grep /42/, (1,2); # OP_GREP, not warned about, in the "everything" & "void_unusual" category
422 Useless use of a constant ("111") in void context at - line 2.
423 Useless use of repeat (x) in void context at - line 3.
424 Useless use of wantarray in void context at - line 5.
425 Useless use of reference-type operator in void context at - line 12.
426 Useless use of reference constructor in void context at - line 13.
427 Useless use of single ref constructor in void context at - line 14.
428 Useless use of defined operator in void context at - line 15.
429 Useless use of hex in void context at - line 16.
430 Useless use of oct in void context at - line 17.
431 Useless use of length in void context at - line 18.
432 Useless use of substr in void context at - line 19.
433 Useless use of vec in void context at - line 20.
434 Useless use of index in void context at - line 21.
435 Useless use of rindex in void context at - line 22.
436 Useless use of sprintf in void context at - line 23.
437 Useless use of array element in void context at - line 24.
438 Useless use of array slice in void context at - line 26.
439 Useless use of hash element in void context at - line 29.
440 Useless use of hash slice in void context at - line 30.
441 Useless use of unpack in void context at - line 31.
442 Useless use of pack in void context at - line 32.
443 Useless use of join or string in void context at - line 33.
444 Useless use of list slice in void context at - line 34.
445 Useless use of sort in void context at - line 37.
446 Useless use of reverse in void context at - line 38.
447 Useless use of range (or flop) in void context at - line 41.
448 Useless use of caller in void context at - line 42.
449 Useless use of fileno in void context at - line 43.
450 Useless use of eof in void context at - line 44.
451 Useless use of tell in void context at - line 45.
452 Useless use of readlink in void context at - line 46.
453 Useless use of time in void context at - line 47.
454 Useless use of localtime in void context at - line 48.
455 Useless use of gmtime in void context at - line 49.
456 Useless use of getgrnam in void context at - line 50.
457 Useless use of getgrgid in void context at - line 51.
458 Useless use of getpwnam in void context at - line 52.
459 Useless use of getpwuid in void context at - line 53.
460 Useless use of subroutine prototype in void context at - line 54.
461 Useless use of smart match in void context at - line 55.
462 Useless use of numeric comparison (<=>) in void context at - line 56.
463 Useless use of a constant ("dsatrewq") in void context at - line 57.
464 Useless use of a constant ("diatrewq") in void context at - line 58.
465 Useless use of a constant ("igatrewq") in void context at - line 59.
466 Useless use of __SUB__ in void context at - line 61.
467 Useless use of anonymous array ([]) in void context at - line 62.
470 use warnings 'void_unusual' ; close STDIN ;
471 grep /42/, (1,2); # OP_GREP
472 no warnings 'void_unusual';
473 grep /42/, (1,2); # OP_GREP
474 use warnings 'everything';
475 grep /42/, (1,2); # OP_GREP
477 Unusual use of grep in void context at - line 3.
478 Unusual use of grep in void context at - line 7.
481 use warnings 'void' ; close STDIN ;
482 my $x = sort (2,1,3);
486 Useless use of sort in scalar context at - line 3.
489 no warnings 'void' ; close STDIN ;
492 wantarray ; # OP_WANTARRAY
502 defined $a ; # OP_DEFINED
505 length $a ; # OP_LENGTH
506 substr $a,1 ; # OP_SUBSTR
507 vec $a,1,2 ; # OP_VEC
508 index $a,1,2 ; # OP_INDEX
509 rindex $a,1,2 ; # OP_RINDEX
510 sprintf $a ; # OP_SPRINTF
514 #values %a ; # OP_VALUES
518 unpack "a", "a" ; # OP_UNPACK
519 pack $a,"" ; # OP_PACK
521 (@a)[0,1] ; # OP_LSLICE
524 sort(1,2) ; # OP_SORT
525 reverse(1,2) ; # OP_REVERSE
530 fileno STDIN ; # OP_FILENO
532 tell STDIN ; # OP_TELL
533 readlink 1; # OP_READLINK
535 localtime ; # OP_LOCALTIME
537 eval { getgrnam 1 }; # OP_GGRNAM
538 eval { getgrgid 1 }; # OP_GGRGID
539 eval { getpwnam 1 }; # OP_GPWNAM
540 eval { getpwuid 1 }; # OP_GPWUID
541 prototype "foo"; # OP_PROTOTYPE
545 use warnings 'void' ;
546 for (@{[0]}) { "$_" } # check warning isn't duplicated
548 for (@{[0]}) { "$_" } # check warning isn't duplicated
550 Useless use of string in void context at - line 3.
553 use warnings 'void' ;
556 if ( ! $Config{d_telldir}) {
559 # telldir not present
564 telldir 1 ; # OP_TELLDIR
566 telldir 1 ; # OP_TELLDIR
568 Useless use of telldir in void context at - line 13.
571 use warnings 'void' ;
574 if ( ! $Config{d_getppid}) {
577 # getppid not present
582 getppid ; # OP_GETPPID
584 getppid ; # OP_GETPPID
586 Useless use of getppid in void context at - line 13.
589 use warnings 'void' ;
592 if ( ! $Config{d_getpgrp}) {
595 # getpgrp not present
600 getpgrp ; # OP_GETPGRP
602 getpgrp ; # OP_GETPGRP
604 Useless use of getpgrp in void context at - line 13.
607 use warnings 'void' ;
610 if ( ! $Config{d_times}) {
622 Useless use of times in void context at - line 13.
625 use warnings 'void' ;
628 if ( ! $Config{d_getprior} or $^O eq 'os2') { # Locks before fixpak22
631 # getpriority not present
636 getpriority 1,2; # OP_GETPRIORITY
638 getpriority 1,2; # OP_GETPRIORITY
640 Useless use of getpriority in void context at - line 13.
643 use warnings 'void' ;
646 if ( ! $Config{d_getlogin}) {
649 # getlogin not present
654 getlogin ; # OP_GETLOGIN
656 getlogin ; # OP_GETLOGIN
658 Useless use of getlogin in void context at - line 13.
661 use warnings 'void' ;
663 if ( ! $Config{d_socket}) {
666 # getsockname not present
667 # getpeername not present
668 # gethostbyname not present
669 # gethostbyaddr not present
670 # gethostent not present
671 # getnetbyname not present
672 # getnetbyaddr not present
673 # getnetent not present
674 # getprotobyname not present
675 # getprotobynumber not present
676 # getprotoent not present
677 # getservbyname not present
678 # getservbyport not present
679 # getservent not present
683 getsockname STDIN ; # OP_GETSOCKNAME
684 getpeername STDIN ; # OP_GETPEERNAME
685 gethostbyname 1 ; # OP_GHBYNAME
686 gethostbyaddr 1,2; # OP_GHBYADDR
687 gethostent ; # OP_GHOSTENT
688 getnetbyname 1 ; # OP_GNBYNAME
689 getnetbyaddr 1,2 ; # OP_GNBYADDR
690 getnetent ; # OP_GNETENT
691 getprotobyname 1; # OP_GPBYNAME
692 getprotobynumber 1; # OP_GPBYNUMBER
693 getprotoent ; # OP_GPROTOENT
694 getservbyname 1,2; # OP_GSBYNAME
695 getservbyport 1,2; # OP_GSBYPORT
696 getservent ; # OP_GSERVENT
699 getsockname STDIN ; # OP_GETSOCKNAME
700 getpeername STDIN ; # OP_GETPEERNAME
701 gethostbyname 1 ; # OP_GHBYNAME
702 gethostbyaddr 1,2; # OP_GHBYADDR
703 gethostent ; # OP_GHOSTENT
704 getnetbyname 1 ; # OP_GNBYNAME
705 getnetbyaddr 1,2 ; # OP_GNBYADDR
706 getnetent ; # OP_GNETENT
707 getprotobyname 1; # OP_GPBYNAME
708 getprotobynumber 1; # OP_GPBYNUMBER
709 getprotoent ; # OP_GPROTOENT
710 getservbyname 1,2; # OP_GSBYNAME
711 getservbyport 1,2; # OP_GSBYPORT
712 getservent ; # OP_GSERVENT
714 # some functions may not be there, so we exit without running
718 Useless use of getsockname in void context at - line 24.
719 Useless use of getpeername in void context at - line 25.
720 Useless use of gethostbyname in void context at - line 26.
721 Useless use of gethostbyaddr in void context at - line 27.
722 Useless use of gethostent in void context at - line 28.
723 Useless use of getnetbyname in void context at - line 29.
724 Useless use of getnetbyaddr in void context at - line 30.
725 Useless use of getnetent in void context at - line 31.
726 Useless use of getprotobyname in void context at - line 32.
727 Useless use of getprotobynumber in void context at - line 33.
728 Useless use of getprotoent in void context at - line 34.
729 Useless use of getservbyname in void context at - line 35.
730 Useless use of getservbyport in void context at - line 36.
731 Useless use of getservent in void context at - line 37.
734 use warnings 'void' ;
745 Useless use of a variable in void context at - line 3.
746 Useless use of a variable in void context at - line 4.
747 Useless use of a variable in void context at - line 5.
748 Useless use of a variable in void context at - line 6.
751 use warnings 'void' ;
754 "x" . "y"; # optimized to OP_CONST
755 2 + 2; # optimized to OP_CONST
756 use constant U => undef;
759 5 || print "bad\n"; # test OPpCONST_SHORTCIRCUIT
760 print "boo\n" if U; # test OPpCONST_SHORTCIRCUIT
761 if($foo){}elsif(""){} # test OPpCONST_SHORTCIRCUIT
765 "x" . "y"; # optimized to OP_CONST
766 2 + 2; # optimized to OP_CONST
768 Useless use of a constant ("abc") in void context at - line 3.
769 Useless use of a constant (7) in void context at - line 4.
770 Useless use of a constant ("xy") in void context at - line 5.
771 Useless use of a constant (4) in void context at - line 6.
772 Useless use of a constant (undef) in void context at - line 8.
773 Useless use of a constant ("\"\t\n") in void context at - line 9.
777 use open qw( :utf8 :std );
778 use warnings 'void' ;
780 "Ẋ" . "ƴ"; # optimized to OP_CONST
781 FOO; # Bareword optimized to OP_CONST
782 use constant ů => undef;
784 5 || print "bad\n"; # test OPpCONST_SHORTCIRCUIT
785 print "boo\n" if ů; # test OPpCONST_SHORTCIRCUIT
788 "Ẋ" . "ƴ"; # optimized to OP_CONST
790 Useless use of a constant ("\340\x{1e06}c") in void context at - line 5.
791 Useless use of a constant ("\x{1e8a}\x{1b4}") in void context at - line 6.
792 Useless use of a constant ("\x{ff26}\x{ff2f}\x{ff2f}") in void context at - line 7.
793 Useless use of a constant (undef) in void context at - line 9.
797 use warnings 'misc' ; use utf8;
798 my $a ; my @a = () ; my %a = () ; my $b = \@a ; my $c = \%a ;my $d = 'test';
818 my $a ; my @a = () ; my %a = () ; my $b = \@a ; my $c = \%a ; my $d = 'test';
836 Applying pattern match (m//) to @a will act on scalar(@a) at - line 5.
837 Applying substitution (s///) to @a2 will act on scalar(@a2) at - line 6.
838 Applying transliteration (tr///) to @a3 will act on scalar(@a3) at - line 7.
839 Applying pattern match (m//) to @array will act on scalar(@array) at - line 8.
840 Applying substitution (s///) to @array will act on scalar(@array) at - line 9.
841 Applying transliteration (tr///) to @array will act on scalar(@array) at - line 10.
842 Applying pattern match (m//) to %a will act on scalar(%a) at - line 11.
843 Applying substitution (s///) to %a2 will act on scalar(%a2) at - line 12.
844 Applying transliteration (tr///) to %a3 will act on scalar(%a3) at - line 13.
845 Applying pattern match (m//) to %hash will act on scalar(%hash) at - line 14.
846 Applying substitution (s///) to %hash will act on scalar(%hash) at - line 15.
847 Applying transliteration (tr///) to %hash will act on scalar(%hash) at - line 16.
848 Useless use of /d modifier in transliteration operator at - line 17.
849 Replacement list is longer than search list at - line 18.
850 Useless use of /d modifier in transliteration operator at - line 20.
851 Replacement list is longer than search list at - line 21.
852 Can't modify array dereference in substitution (s///) at - line 6, near "s/a/b/ ;"
853 BEGIN not safe after errors--compilation aborted at - line 23.
856 use warnings 'parenthesis' ;
858 my @foo,%bar, $quux; # there's a TAB here
860 no warnings 'parenthesis' ;
863 Parentheses missing around "my" list at - line 3.
864 Parentheses missing around "my" list at - line 4.
867 use warnings 'parenthesis' ;
869 no warnings 'parenthesis' ;
872 Parentheses missing around "our" list at - line 3.
875 use warnings 'parenthesis' ;
876 local $a, $b = (1,2);
878 no warnings 'parenthesis' ;
879 local $c, $d = (1,2);
881 Parentheses missing around "local" list at - line 3.
882 Parentheses missing around "local" list at - line 4.
885 use warnings 'bareword' ;
887 no warnings 'bareword' ;
890 Bareword found in conditional at - line 3.
896 use warnings 'misc' ;
898 $x = 1 if $x = <FH> ;
902 $x = 1 if $x = <FH> ;
906 Value of <HANDLE> construct can be "0"; test with defined() at - line 4.
907 Value of <HANDLE> construct can be "0"; test with defined() at - line 5.
910 use warnings 'misc' ;
912 $x = 1 if $x = readdir FH ;
916 $x = 1 if $x = readdir FH ;
921 Value of readdir() operator can be "0"; test with defined() at - line 4.
922 Value of readdir() operator can be "0"; test with defined() at - line 5.
925 use warnings 'misc' ;
934 Value of glob construct can be "0"; test with defined() at - line 3.
935 Value of glob construct can be "0"; test with defined() at - line 4.
938 use warnings 'misc' ;
940 $x = 1 if $x = each %a ;
942 $x = 1 if $x = each %a ;
944 Value of each() operator can be "0"; test with defined() at - line 4.
947 use warnings 'misc' ;
948 $x = 1 while $x = <*> and 0 ;
950 $x = 1 while $x = <*> and 0 ;
952 Value of glob construct can be "0"; test with defined() at - line 3.
955 use warnings 'misc' ;
957 $x = 1 while $x = readdir FH and 0 ;
959 $x = 1 while $x = readdir FH and 0 ;
962 Value of readdir() operator can be "0"; test with defined() at - line 4.
967 ($_ = <FH>) // ($_ = 1);
973 use warnings 'redefine' ;
976 sub fred { # warning should be for this line
978 no warnings 'redefine' ;
983 Subroutine fred redefined at - line 4.
984 Subroutine fred redefined at - line 5.
987 use warnings 'redefine' ;
990 no warnings 'redefine' ;
993 Constant subroutine fred redefined at - line 4.
999 Constant subroutine fred redefined at - line 3.
1003 *fred = sub () { 2 };
1005 Constant subroutine main::fred redefined at - line 3.
1008 use feature "lexical_subs", "state";
1009 my sub fred () { 1 }
1012 sub george () { 2 } # should *not* produce redef warnings by default
1013 state sub phred () { 1 }
1015 state sub jorge { 1 }
1016 sub jorge () { 2 } # should *not* produce redef warnings by default
1018 The lexical_subs feature is experimental at - line 3.
1019 Prototype mismatch: sub fred () vs none at - line 4.
1020 Constant subroutine fred redefined at - line 4.
1021 The lexical_subs feature is experimental at - line 5.
1022 Prototype mismatch: sub george: none vs () at - line 6.
1023 The lexical_subs feature is experimental at - line 7.
1024 Prototype mismatch: sub phred () vs none at - line 8.
1025 Constant subroutine phred redefined at - line 8.
1026 The lexical_subs feature is experimental at - line 9.
1027 Prototype mismatch: sub jorge: none vs () at - line 10.
1030 no warnings 'redefine' ;
1036 no warnings 'redefine' ;
1038 *fred = sub () { 2 };
1042 use warnings 'redefine' ;
1047 no warnings 'redefine' ;
1051 Format FRED redefined at - line 5.
1053 # op.c [Perl_ck_fun]
1060 no warnings 'experimental::autoderef' ;
1067 push on reference is experimental at - line 3.
1068 pop on reference is experimental at - line 4.
1069 shift on reference is experimental at - line 5.
1070 unshift on reference is experimental at - line 6.
1071 splice on reference is experimental at - line 7.
1074 use warnings 'exec' ;
1078 Statement unlikely to be reached at - line 4.
1079 (Maybe you meant system() when you said exec()?)
1081 # op.c, no warning if exec isn't a statement.
1082 use warnings 'exec' ;
1083 $a || exec "$^X -e 1" ;
1091 Can't use 'defined(@array)' (Maybe you should just omit the defined()?) at - line 2.
1097 Can't use 'defined(@array)' (Maybe you should just omit the defined()?) at - line 2.
1100 defined(@a = (1,2,3));
1107 Can't use 'defined(%hash)' (Maybe you should just omit the defined()?) at - line 2.
1113 Can't use 'defined(%hash)' (Maybe you should just omit the defined()?) at - line 2.
1116 no warnings 'exec' ;
1125 use constant foo=>bar; sub foo(@);
1126 use constant bav=>bar; sub bav(); # no warning
1129 Prototype mismatch: sub main::fred () vs ($) at - line 3.
1130 Prototype mismatch: sub foo () vs (@) at - line 4.
1131 Prototype mismatch: sub btu: none vs () at - line 6.
1135 use open qw( :utf8 :std );
1139 Prototype mismatch: sub main::frèd () vs ($) at - line 5.
1143 use open qw( :utf8 :std );
1145 eval "sub fòò (@\$\0) {}";
1147 Prototype after '@' for main::fòò : @$\0 at (eval 1) line 1.
1148 Illegal character in prototype for main::fòò : @$\0 at (eval 1) line 1.
1152 use open qw( :utf8 :std );
1154 eval "sub foo (@\0) {}";
1156 Prototype after '@' for main::foo : @\0 at (eval 1) line 1.
1157 Illegal character in prototype for main::foo : @\0 at (eval 1) line 1.
1161 use open qw( :utf8 :std );
1163 BEGIN { $::{"foo"} = "\@\$\0L\351on" }
1164 BEGIN { eval "sub foo (@\$\0L\x{c3}\x{a9}on) {}"; }
1166 Prototype after '@' for main::foo : @$\x{0}L... at (eval 1) line 1.
1167 Illegal character in prototype for main::foo : @$\x{0}L... at (eval 1) line 1.
1171 use open qw( :utf8 :std );
1173 BEGIN { eval "sub foo (@\0) {}"; }
1175 Prototype after '@' for main::foo : @\0 at (eval 1) line 1.
1176 Illegal character in prototype for main::foo : @\0 at (eval 1) line 1.
1180 eval "sub foo (@\xAB) {}";
1182 Prototype after '@' for main::foo : @\x{ab} at (eval 1) line 1.
1183 Illegal character in prototype for main::foo : @\x{ab} at (eval 1) line 1.
1187 use open qw( :utf8 :std );
1189 BEGIN { eval "sub foo (@\x{30cb}) {}"; }
1191 Prototype after '@' for main::foo : @\x{30cb} at (eval 1) line 1.
1192 Illegal character in prototype for main::foo : @\x{30cb} at (eval 1) line 1.
1196 use open qw( :utf8 :std );
1198 BEGIN { $::{"foo"} = "\x{30cb}" }
1199 BEGIN { eval "sub foo {}"; }
1201 Prototype mismatch: sub main::foo (ニ) vs none at (eval 1) line 1.
1208 no warnings 'prototype' ;
1211 use warnings 'prototype' ;
1218 Prototype mismatch: sub main::fred () vs ($) at - line 4.
1219 Prototype mismatch: sub main::freD () vs ($) at - line 11.
1220 Prototype mismatch: sub main::FRED () vs ($) at - line 14.
1222 # op.c [S_simplify_sort]
1224 my @tests = split /^/, '
1225 sort {$a <=> $b} @a;
1226 sort {$a cmp $b} @a;
1227 { use integer; sort {$a <=> $b} @a}
1228 sort {$b <=> $a} @a;
1229 sort {$b cmp $a} @a;
1230 { use integer; sort {$b <=> $a} @a}
1232 for my $pragma ('use warnings "syntax";', '') {
1233 for my $vars ('', 'my $a;', 'my $b;', 'my ($a,$b);') {
1234 for my $inner_stmt ('', 'print;', 'func();') {
1235 eval "#line " . ++$line . "01 -\n$pragma\n$vars"
1236 . join "", map s/sort \{\K/$inner_stmt/r, @tests;
1242 use warnings 'syntax';
1244 # These used to be errors!
1245 sort { ; } $a <=> $b;
1246 sort { ; } $a, "<=>";
1247 sort { ; } $a, $cmp;
1248 sort $a, $b if $cmpany_name;
1252 "my $a" used in sort comparison at - line 403.
1253 "my $a" used in sort comparison at - line 404.
1254 "my $a" used in sort comparison at - line 405.
1255 "my $a" used in sort comparison at - line 406.
1256 "my $a" used in sort comparison at - line 407.
1257 "my $a" used in sort comparison at - line 408.
1258 "my $a" used in sort comparison at - line 503.
1259 "my $a" used in sort comparison at - line 504.
1260 "my $a" used in sort comparison at - line 505.
1261 "my $a" used in sort comparison at - line 506.
1262 "my $a" used in sort comparison at - line 507.
1263 "my $a" used in sort comparison at - line 508.
1264 "my $a" used in sort comparison at - line 603.
1265 "my $a" used in sort comparison at - line 604.
1266 "my $a" used in sort comparison at - line 605.
1267 "my $a" used in sort comparison at - line 606.
1268 "my $a" used in sort comparison at - line 607.
1269 "my $a" used in sort comparison at - line 608.
1270 "my $b" used in sort comparison at - line 703.
1271 "my $b" used in sort comparison at - line 704.
1272 "my $b" used in sort comparison at - line 705.
1273 "my $b" used in sort comparison at - line 706.
1274 "my $b" used in sort comparison at - line 707.
1275 "my $b" used in sort comparison at - line 708.
1276 "my $b" used in sort comparison at - line 803.
1277 "my $b" used in sort comparison at - line 804.
1278 "my $b" used in sort comparison at - line 805.
1279 "my $b" used in sort comparison at - line 806.
1280 "my $b" used in sort comparison at - line 807.
1281 "my $b" used in sort comparison at - line 808.
1282 "my $b" used in sort comparison at - line 903.
1283 "my $b" used in sort comparison at - line 904.
1284 "my $b" used in sort comparison at - line 905.
1285 "my $b" used in sort comparison at - line 906.
1286 "my $b" used in sort comparison at - line 907.
1287 "my $b" used in sort comparison at - line 908.
1288 "my $a" used in sort comparison at - line 1003.
1289 "my $b" used in sort comparison at - line 1003.
1290 "my $a" used in sort comparison at - line 1004.
1291 "my $b" used in sort comparison at - line 1004.
1292 "my $a" used in sort comparison at - line 1005.
1293 "my $b" used in sort comparison at - line 1005.
1294 "my $b" used in sort comparison at - line 1006.
1295 "my $a" used in sort comparison at - line 1006.
1296 "my $b" used in sort comparison at - line 1007.
1297 "my $a" used in sort comparison at - line 1007.
1298 "my $b" used in sort comparison at - line 1008.
1299 "my $a" used in sort comparison at - line 1008.
1300 "my $a" used in sort comparison at - line 1103.
1301 "my $b" used in sort comparison at - line 1103.
1302 "my $a" used in sort comparison at - line 1104.
1303 "my $b" used in sort comparison at - line 1104.
1304 "my $a" used in sort comparison at - line 1105.
1305 "my $b" used in sort comparison at - line 1105.
1306 "my $b" used in sort comparison at - line 1106.
1307 "my $a" used in sort comparison at - line 1106.
1308 "my $b" used in sort comparison at - line 1107.
1309 "my $a" used in sort comparison at - line 1107.
1310 "my $b" used in sort comparison at - line 1108.
1311 "my $a" used in sort comparison at - line 1108.
1312 "my $a" used in sort comparison at - line 1203.
1313 "my $b" used in sort comparison at - line 1203.
1314 "my $a" used in sort comparison at - line 1204.
1315 "my $b" used in sort comparison at - line 1204.
1316 "my $a" used in sort comparison at - line 1205.
1317 "my $b" used in sort comparison at - line 1205.
1318 "my $b" used in sort comparison at - line 1206.
1319 "my $a" used in sort comparison at - line 1206.
1320 "my $b" used in sort comparison at - line 1207.
1321 "my $a" used in sort comparison at - line 1207.
1322 "my $b" used in sort comparison at - line 1208.
1323 "my $a" used in sort comparison at - line 1208.
1325 # op.c [S_simplify_sort]
1326 use warnings 'syntax'; use 5.01;
1328 sort { $a <=> $b } ();
1330 "state $a" used in sort comparison at - line 4.
1332 # op.c [Perl_ck_cmp]
1333 use warnings 'syntax' ;
1334 no warnings 'deprecated';
1371 $[ used in numeric lt (<) (did you mean $] ?) at - line 4.
1372 $[ used in numeric gt (>) (did you mean $] ?) at - line 5.
1373 $[ used in numeric le (<=) (did you mean $] ?) at - line 6.
1374 $[ used in numeric ge (>=) (did you mean $] ?) at - line 7.
1375 $[ used in numeric lt (<) (did you mean $] ?) at - line 8.
1376 $[ used in numeric gt (>) (did you mean $] ?) at - line 9.
1377 $[ used in numeric le (<=) (did you mean $] ?) at - line 10.
1378 $[ used in numeric ge (>=) (did you mean $] ?) at - line 11.
1379 $[ used in numeric lt (<) (did you mean $] ?) at - line 13.
1380 $[ used in numeric gt (>) (did you mean $] ?) at - line 14.
1381 $[ used in numeric le (<=) (did you mean $] ?) at - line 15.
1382 $[ used in numeric ge (>=) (did you mean $] ?) at - line 16.
1383 $[ used in numeric lt (<) (did you mean $] ?) at - line 17.
1384 $[ used in numeric gt (>) (did you mean $] ?) at - line 18.
1385 $[ used in numeric le (<=) (did you mean $] ?) at - line 19.
1386 $[ used in numeric ge (>=) (did you mean $] ?) at - line 20.
1388 # op.c [Perl_ck_each]
1393 no warnings 'experimental::autoderef' ;
1398 keys on reference is experimental at - line 3.
1399 values on reference is experimental at - line 4.
1400 each on reference is experimental at - line 5.
1402 # op.c [Perl_ck_length]
1403 use warnings 'syntax' ;
1412 length() used on @a (did you mean "scalar(@a)"?) at - line 3.
1413 length() used on %b (did you mean "scalar(keys %b)"?) at - line 4.
1414 length() used on @array (did you mean "scalar(@array)"?) at - line 5.
1415 length() used on %hash (did you mean "scalar(keys %hash)"?) at - line 6.
1416 length() used on %h (did you mean "scalar(keys %h)"?) at - line 8.
1417 length() used on @g (did you mean "scalar(@g)"?) at - line 9.
1420 use warnings 'syntax' ;
1421 join /---/, 'x', 'y', 'z';
1423 /---/ should probably be written as "---" at - line 3.
1427 use open qw( :utf8 :std );
1428 use warnings 'syntax' ;
1429 join /~~~/, 'x', 'y', 'z';
1431 /~~~/ should probably be written as "~~~" at - line 5.
1434 use warnings 'prototype' ;
1437 no warnings 'prototype' ;
1441 main::fred() called too early to check prototype at - line 3.
1443 # op.c [Perl_newATTRSUB]
1445 use warnings 'void' ;
1446 BEGIN { $| = 1; print "in begin\n"; }
1447 CHECK { print "in check\n"; }
1448 INIT { print "in init\n"; }
1449 END { print "in end\n"; }
1450 print "in mainline\n";
1454 delete $INC{"abc.pm"};
1463 Too late to run CHECK block at abc.pm line 3.
1464 Too late to run INIT block at abc.pm line 4.
1467 Too late to run CHECK block at abc.pm line 3.
1468 Too late to run INIT block at abc.pm line 4.
1474 # op.c [Perl_newATTRSUB]
1476 no warnings 'void' ;
1477 BEGIN { $| = 1; print "in begin\n"; }
1478 CHECK { print "in check\n"; }
1479 INIT { print "in init\n"; }
1480 END { print "in end\n"; }
1481 print "in mainline\n";
1496 use warnings 'syntax' ;
1499 no warnings 'syntax' ;
1503 Useless use of push with no values at - line 4.
1504 Useless use of unshift with no values at - line 5.
1507 # 20020401 mjd@plover.com at suggestion of jfriedl@yahoo.com
1508 use warnings 'regexp';
1509 split /blah/g, "blah";
1510 no warnings 'regexp';
1511 split /blah/g, "blah";
1513 Use of /g modifier is meaningless in split at - line 4.
1516 use warnings 'precedence';
1523 $a = $b <=> $c & $d;
1524 $a &= $b == $c; $a |= $b == $c; $a ^= $b == $c; # shouldn't warn
1525 no warnings 'precedence';
1532 $a = $b <=> $c & $d;
1534 Possible precedence problem on bitwise & operator at - line 3.
1535 Possible precedence problem on bitwise ^ operator at - line 4.
1536 Possible precedence problem on bitwise | operator at - line 5.
1537 Possible precedence problem on bitwise & operator at - line 6.
1538 Possible precedence problem on bitwise ^ operator at - line 7.
1539 Possible precedence problem on bitwise | operator at - line 8.
1540 Possible precedence problem on bitwise & operator at - line 9.
1544 use warnings 'precedence';
1551 $a = $b <=> $c & $d;
1552 no warnings 'precedence';
1559 $a = $b <=> $c & $d;
1561 Possible precedence problem on bitwise & operator at - line 4.
1562 Possible precedence problem on bitwise ^ operator at - line 5.
1563 Possible precedence problem on bitwise | operator at - line 6.
1564 Possible precedence problem on bitwise & operator at - line 7.
1565 Possible precedence problem on bitwise ^ operator at - line 8.
1566 Possible precedence problem on bitwise | operator at - line 9.
1567 Possible precedence problem on bitwise & operator at - line 10.
1571 # ok => local() has desired effect;
1572 # ignore=> local() silently ignored
1574 use warnings 'syntax';
1576 local(undef); # OP_UNDEF ignore
1577 sub lval : lvalue {};
1578 local(lval()); # OP_ENTERSUB
1579 local($x **= 1); # OP_POW
1580 local($x *= 1); # OP_MULTIPLY
1581 local($x /= 1); # OP_DIVIDE
1582 local($x %= 1); # OP_MODULO
1583 local($x x= 1); # OP_REPEAT
1584 local($x += 1); # OP_ADD
1585 local($x -= 1); # OP_SUBTRACT
1586 local($x .= 1); # OP_CONCAT
1587 local($x <<= 1); # OP_LEFT_SHIFT
1588 local($x >>= 1); # OP_RIGHT_SHIFT
1589 local($x &= 1); # OP_BIT_AND
1590 local($x ^= 1); # OP_BIT_XOR
1591 local($x |= 1); # OP_BIT_OR
1594 local($x *= 1); # OP_I_MULTIPLY
1595 local($x /= 1); # OP_I_DIVIDE
1596 local($x %= 1); # OP_I_MODULO
1597 local($x += 1); # OP_I_ADD
1598 local($x -= 1); # OP_I_SUBTRACT
1600 local($x?$y:$z) = 1; # OP_COND_EXPR ok
1601 # these two are fatal run-time errors instead
1602 #local(@$a); # OP_RV2AV ok
1603 #local(%$a); # OP_RV2HV ok
1604 local(*a); # OP_RV2GV ok
1605 local(@a[1,2]); # OP_ASLICE ok
1606 local(@a{1,2}); # OP_HSLICE ok
1607 local(@a = (1,2)); # OP_AASSIGN
1608 local($$x); # OP_RV2SV ok
1609 local($#a); # OP_AV2ARYLEN
1610 local($x = 1); # OP_SASSIGN
1611 local($x &&= 1); # OP_ANDASSIGN
1612 local($x ||= 1); # OP_ORASSIGN
1613 local($x //= 1); # OP_DORASSIGN
1614 local($a[0]); # OP_AELEMFAST ok
1616 local(substr($x,0,1)); # OP_SUBSTR
1617 local(pos($x)); # OP_POS
1618 local(vec($x,0,1)); # OP_VEC
1619 local($a[$b]); # OP_AELEM ok
1620 local($a{$b}); # OP_HELEM ok
1622 no warnings 'syntax';
1624 Useless localization of subroutine entry at - line 10.
1625 Useless localization of exponentiation (**) at - line 11.
1626 Useless localization of multiplication (*) at - line 12.
1627 Useless localization of division (/) at - line 13.
1628 Useless localization of modulus (%) at - line 14.
1629 Useless localization of repeat (x) at - line 15.
1630 Useless localization of addition (+) at - line 16.
1631 Useless localization of subtraction (-) at - line 17.
1632 Useless localization of concatenation (.) or string at - line 18.
1633 Useless localization of left bitshift (<<) at - line 19.
1634 Useless localization of right bitshift (>>) at - line 20.
1635 Useless localization of bitwise and (&) at - line 21.
1636 Useless localization of bitwise xor (^) at - line 22.
1637 Useless localization of bitwise or (|) at - line 23.
1638 Useless localization of integer multiplication (*) at - line 26.
1639 Useless localization of integer division (/) at - line 27.
1640 Useless localization of integer modulus (%) at - line 28.
1641 Useless localization of integer addition (+) at - line 29.
1642 Useless localization of integer subtraction (-) at - line 30.
1643 Useless localization of list assignment at - line 39.
1644 Useless localization of array length at - line 41.
1645 Useless localization of scalar assignment at - line 42.
1646 Useless localization of logical and assignment (&&=) at - line 43.
1647 Useless localization of logical or assignment (||=) at - line 44.
1648 Useless localization of defined or assignment (//=) at - line 45.
1649 Useless localization of substr at - line 48.
1650 Useless localization of match position at - line 49.
1651 Useless localization of vec at - line 50.
1658 my ($x5,@x6, %x7) if 0;
1661 # these shouldn't warn
1665 if (my $w2) { $a=1 }
1666 if ($a && (my $w3 = 1)) {$a = 2}
1669 Deprecated use of my() in false conditional at - line 2.
1670 Deprecated use of my() in false conditional at - line 3.
1671 Deprecated use of my() in false conditional at - line 4.
1672 Deprecated use of my() in false conditional at - line 5.
1673 Deprecated use of my() in false conditional at - line 6.
1674 Deprecated use of my() in false conditional at - line 7.
1675 Deprecated use of my() in false conditional at - line 8.
1680 use warnings 'deprecated';
1683 no warnings 'deprecated';
1687 Use of assignment to $[ is deprecated at - line 2.
1688 Use of assignment to $[ is deprecated at - line 3.
1689 Use of assignment to $[ is deprecated at - line 5.
1690 Use of assignment to $[ is deprecated at - line 6.
1693 use warnings 'void';
1694 @x = split /y/, "z";
1695 $x = split /y/, "z";
1698 @x = split /y/, "z";
1699 $x = split /y/, "z";
1702 Useless use of split in void context at - line 5.
1705 use warnings 'redefine' ;
1707 use open qw( :utf8 :std );
1710 no warnings 'redefine' ;
1713 Subroutine frèd redefined at - line 6.
1716 use warnings 'redefine' ;
1718 use open qw( :utf8 :std );
1721 no warnings 'redefine' ;
1724 Constant subroutine frèd redefined at - line 6.
1728 use open qw( :utf8 :std );
1732 Constant subroutine frèd redefined at - line 5.
1736 use open qw( :utf8 :std );
1738 *frèd = sub () { 2 };
1740 Constant subroutine main::frèd redefined at - line 5.
1743 use warnings 'redefine' ;
1745 use open qw( :utf8 :std );
1748 no warnings 'redefine' ;
1751 Subroutine ᚠርƊ redefined at - line 6.
1754 use warnings 'redefine' ;
1756 use open qw( :utf8 :std );
1759 no warnings 'redefine' ;
1762 Constant subroutine ᚠርƊ redefined at - line 6.
1766 use open qw( :utf8 :std );
1770 Constant subroutine ᚠርƊ redefined at - line 5.
1774 use open qw( :utf8 :std );
1776 *ᚠርƊ = sub () { 2 };
1778 Constant subroutine main::ᚠርƊ redefined at - line 5.
1781 sub DynaLoader::dl_error {};
1783 # We're testing that the warnings report the same line number:
1784 eval <<'EOC' or die $@;
1786 DynaLoader::boot_DynaLoader("DynaLoader");
1789 eval <<'EOC' or die $@;
1791 DynaLoader::boot_DynaLoader("DynaLoader");
1797 \ASubroutine DynaLoader::dl_error redefined at \(eval 1\) line 2\.
1799 Subroutine DynaLoader::dl_error redefined at \(eval 2\) line 2\.
1803 sub do_warn_1 { return $a or $b; }
1804 sub do_warn_2 { return $a and $b; }
1805 sub do_warn_3 { return $a xor $b; }
1806 sub do_warn_4 { die $a or $b; }
1807 sub do_warn_5 { die $a and $b; }
1808 sub do_warn_6 { die $a xor $b; }
1809 sub do_warn_7 { exit $a or $b; }
1810 sub do_warn_8 { exit $a and $b; }
1811 sub do_warn_9 { exit $a xor $b; }
1813 # Since exit is an unary operator, it is even stronger than
1815 sub do_warn_10 { exit $a || $b; }
1816 sub do_warn_11 { exit $a && $b; }
1818 sub do_warn_12 { goto $a or $b; }
1819 sub do_warn_13 { goto $a and $b; }
1820 sub do_warn_14 { goto $a xor $b; }
1821 sub do_warn_15 { next $a or $b while(1); }
1822 sub do_warn_16 { next $a and $b while(1); }
1823 sub do_warn_17 { next $a xor $b while(1); }
1824 sub do_warn_18 { last $a or $b while(1); }
1825 sub do_warn_19 { last $a and $b while(1); }
1826 sub do_warn_20 { last $a xor $b while(1); }
1827 sub do_warn_21 { redo $a or $b while(1); }
1828 sub do_warn_22 { redo $a and $b while(1); }
1829 sub do_warn_23 { redo $a xor $b while(1); }
1830 # These get re-written to "(return/die $a) and $b"
1831 sub do_warn_24 { $b if return $a; }
1832 sub do_warn_25 { $b if die $a; }
1834 Possible precedence issue with control flow operator at - line 3.
1835 Possible precedence issue with control flow operator at - line 4.
1836 Possible precedence issue with control flow operator at - line 5.
1837 Possible precedence issue with control flow operator at - line 6.
1838 Possible precedence issue with control flow operator at - line 7.
1839 Possible precedence issue with control flow operator at - line 8.
1840 Possible precedence issue with control flow operator at - line 9.
1841 Possible precedence issue with control flow operator at - line 10.
1842 Possible precedence issue with control flow operator at - line 11.
1843 Possible precedence issue with control flow operator at - line 15.
1844 Possible precedence issue with control flow operator at - line 16.
1845 Possible precedence issue with control flow operator at - line 18.
1846 Possible precedence issue with control flow operator at - line 19.
1847 Possible precedence issue with control flow operator at - line 20.
1848 Possible precedence issue with control flow operator at - line 21.
1849 Possible precedence issue with control flow operator at - line 22.
1850 Possible precedence issue with control flow operator at - line 23.
1851 Possible precedence issue with control flow operator at - line 24.
1852 Possible precedence issue with control flow operator at - line 25.
1853 Possible precedence issue with control flow operator at - line 26.
1854 Possible precedence issue with control flow operator at - line 27.
1855 Possible precedence issue with control flow operator at - line 28.
1856 Possible precedence issue with control flow operator at - line 29.
1857 Possible precedence issue with control flow operator at - line 31.
1858 Possible precedence issue with control flow operator at - line 32.
1861 # (same as above, except these should not warn)
1862 use constant FEATURE => 1;
1863 use constant MISSING_FEATURE => 0;
1865 sub dont_warn_1 { MISSING_FEATURE and return or dont_warn_3(); }
1866 sub dont_warn_2 { FEATURE || return and dont_warn_3(); }
1867 sub dont_warn_3 { not FEATURE and return or dont_warn_3(); }
1868 sub dont_warn_4 { !MISSING_FEATURE || return and dont_warn_3(); }
1869 sub dont_warn_5 { MISSING_FEATURE and die or dont_warn_3(); }
1870 sub dont_warn_6 { FEATURE || die and dont_warn_3(); }
1871 sub dont_warn_7 { not FEATURE and die or dont_warn_3(); }
1872 sub dont_warn_8 { !MISSING_FEATURE || die and dont_warn_3(); }
1873 sub dont_warn_9 { MISSING_FEATURE and goto $a or dont_warn_3(); }
1874 sub dont_warn_10 { FEATURE || goto $a and dont_warn_3(); }
1875 sub dont_warn_11 { not FEATURE and goto $a or dont_warn_3(); }
1876 sub dont_warn_12 { !MISSING_FEATURE || goto $a and dont_warn_3(); }
1878 sub dont_warn_13 { MISSING_FEATURE and exit $a or dont_warn_3(); }
1879 sub dont_warn_14 { FEATURE || exit $a and dont_warn_3(); }
1880 sub dont_warn_15 { not FEATURE and exit $a or dont_warn_3(); }
1881 sub dont_warn_16 { !MISSING_FEATURE || exit $a and dont_warn_3(); }
1883 sub dont_warn_17 { MISSING_FEATURE and next or dont_warn_3() while(1); }
1884 sub dont_warn_18 { FEATURE || next and dont_warn_3() while(1); }
1885 sub dont_warn_19 { not FEATURE and next or dont_warn_3() while(1); }
1886 sub dont_warn_20 { !MISSING_FEATURE || next and dont_warn_3() while(1); }
1887 sub dont_warn_21 { MISSING_FEATURE and redo or dont_warn_3() while(1); }
1888 sub dont_warn_22 { FEATURE || redo and dont_warn_3() while(1); }
1889 sub dont_warn_23 { not FEATURE and redo or dont_warn_3() while(1); }
1890 sub dont_warn_24 { !MISSING_FEATURE || redo and dont_warn_3() while(1); }
1891 sub dont_warn_25 { MISSING_FEATURE and last or dont_warn_3() while(1); }
1892 sub dont_warn_26 { FEATURE || last and dont_warn_3() while(1); }
1893 sub dont_warn_27 { not FEATURE and last or dont_warn_3() while(1); }
1894 sub dont_warn_28 { !MISSING_FEATURE || last and dont_warn_3() while(1); }
1896 # These are weird, but at least not ambiguous.
1897 sub dont_warn_29 { return ($a or $b); }
1898 sub dont_warn_30 { return ($a and $b); }
1899 sub dont_warn_31 { return ($a xor $b); }
1900 sub dont_warn_32 { die ($a or $b); }
1901 sub dont_warn_33 { die ($a and $b); }
1902 sub dont_warn_34 { die ($a xor $b); }
1903 sub dont_warn_35 { goto ($a or $b); }
1904 sub dont_warn_36 { goto ($a and $b); }
1905 sub dont_warn_37 { goto ($a xor $b); }
1906 sub dont_warn_38 { next ($a or $b) while(1); }
1907 sub dont_warn_39 { next ($a and $b) while(1); }
1908 sub dont_warn_40 { next ($a xor $b) while(1); }
1909 sub dont_warn_41 { last ($a or $b) while(1); }
1910 sub dont_warn_42 { last ($a and $b) while(1); }
1911 sub dont_warn_43 { last ($a xor $b) while(1); }
1912 sub dont_warn_44 { redo ($a or $b) while(1); }
1913 sub dont_warn_45 { redo ($a and $b) while(1); }
1914 sub dont_warn_46 { redo ($a xor $b) while(1); }
1917 use feature "signatures";
1921 $bbb = sub ($a) { 4 };
1923 The signatures feature is experimental at - line 3.
1924 The signatures feature is experimental at - line 5.
1926 no warnings "experimental::signatures";
1927 use feature "signatures";
1931 $bbb = sub ($a) { 4 };
1934 use warnings 'numeric';
1938 no warnings 'numeric';
1941 no warnings 'numeric';
1943 Negative repeat count does nothing at - line 3.
1944 Negative repeat count does nothing at - line 4.