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 defined(@array) is deprecated
75 (Maybe you should just omit the defined()?)
77 defined (@a = (1,2,3)) ;
79 defined(%hash) is deprecated
80 (Maybe you should just omit the defined()?)
83 "my %s" used in sort comparison
85 $[ used in comparison (did you mean $] ?)
87 each on reference is experimental [ck_each]
88 keys on reference is experimental
89 values on reference is experimental
91 length() used on @array (did you mean "scalar(@array)"?)
92 length() used on %hash (did you mean "scalar(keys %hash)"?)
94 /---/ should probably be written as "---"
97 %s() called too early to check prototype [Perl_peep]
98 fred() ; sub fred ($$) {}
101 Package '%s' not found (did you use the incorrect case?)
103 Use of /g modifier is meaningless in split
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
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 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.
469 use warnings 'void' ; close STDIN ;
470 my $x = sort (2,1,3);
474 Useless use of sort in scalar context at - line 3.
477 no warnings 'void' ; close STDIN ;
480 wantarray ; # OP_WANTARRAY
490 defined $a ; # OP_DEFINED
493 length $a ; # OP_LENGTH
494 substr $a,1 ; # OP_SUBSTR
495 vec $a,1,2 ; # OP_VEC
496 index $a,1,2 ; # OP_INDEX
497 rindex $a,1,2 ; # OP_RINDEX
498 sprintf $a ; # OP_SPRINTF
502 #values %a ; # OP_VALUES
506 unpack "a", "a" ; # OP_UNPACK
507 pack $a,"" ; # OP_PACK
509 (@a)[0,1] ; # OP_LSLICE
512 sort(1,2) ; # OP_SORT
513 reverse(1,2) ; # OP_REVERSE
518 fileno STDIN ; # OP_FILENO
520 tell STDIN ; # OP_TELL
521 readlink 1; # OP_READLINK
523 localtime ; # OP_LOCALTIME
525 eval { getgrnam 1 }; # OP_GGRNAM
526 eval { getgrgid 1 }; # OP_GGRGID
527 eval { getpwnam 1 }; # OP_GPWNAM
528 eval { getpwuid 1 }; # OP_GPWUID
529 prototype "foo"; # OP_PROTOTYPE
533 use warnings 'void' ;
534 for (@{[0]}) { "$_" } # check warning isn't duplicated
536 for (@{[0]}) { "$_" } # check warning isn't duplicated
538 Useless use of string in void context at - line 3.
541 use warnings 'void' ;
544 if ( ! $Config{d_telldir}) {
547 # telldir not present
552 telldir 1 ; # OP_TELLDIR
554 telldir 1 ; # OP_TELLDIR
556 Useless use of telldir in void context at - line 13.
559 use warnings 'void' ;
562 if ( ! $Config{d_getppid}) {
565 # getppid not present
570 getppid ; # OP_GETPPID
572 getppid ; # OP_GETPPID
574 Useless use of getppid in void context at - line 13.
577 use warnings 'void' ;
580 if ( ! $Config{d_getpgrp}) {
583 # getpgrp not present
588 getpgrp ; # OP_GETPGRP
590 getpgrp ; # OP_GETPGRP
592 Useless use of getpgrp in void context at - line 13.
595 use warnings 'void' ;
598 if ( ! $Config{d_times}) {
610 Useless use of times in void context at - line 13.
613 use warnings 'void' ;
616 if ( ! $Config{d_getprior} or $^O eq 'os2') { # Locks before fixpak22
619 # getpriority not present
624 getpriority 1,2; # OP_GETPRIORITY
626 getpriority 1,2; # OP_GETPRIORITY
628 Useless use of getpriority in void context at - line 13.
631 use warnings 'void' ;
634 if ( ! $Config{d_getlogin}) {
637 # getlogin not present
642 getlogin ; # OP_GETLOGIN
644 getlogin ; # OP_GETLOGIN
646 Useless use of getlogin in void context at - line 13.
649 use warnings 'void' ;
651 if ( ! $Config{d_socket}) {
654 # getsockname not present
655 # getpeername not present
656 # gethostbyname not present
657 # gethostbyaddr not present
658 # gethostent not present
659 # getnetbyname not present
660 # getnetbyaddr not present
661 # getnetent not present
662 # getprotobyname not present
663 # getprotobynumber not present
664 # getprotoent not present
665 # getservbyname not present
666 # getservbyport not present
667 # getservent not present
671 getsockname STDIN ; # OP_GETSOCKNAME
672 getpeername STDIN ; # OP_GETPEERNAME
673 gethostbyname 1 ; # OP_GHBYNAME
674 gethostbyaddr 1,2; # OP_GHBYADDR
675 gethostent ; # OP_GHOSTENT
676 getnetbyname 1 ; # OP_GNBYNAME
677 getnetbyaddr 1,2 ; # OP_GNBYADDR
678 getnetent ; # OP_GNETENT
679 getprotobyname 1; # OP_GPBYNAME
680 getprotobynumber 1; # OP_GPBYNUMBER
681 getprotoent ; # OP_GPROTOENT
682 getservbyname 1,2; # OP_GSBYNAME
683 getservbyport 1,2; # OP_GSBYPORT
684 getservent ; # OP_GSERVENT
687 getsockname STDIN ; # OP_GETSOCKNAME
688 getpeername STDIN ; # OP_GETPEERNAME
689 gethostbyname 1 ; # OP_GHBYNAME
690 gethostbyaddr 1,2; # OP_GHBYADDR
691 gethostent ; # OP_GHOSTENT
692 getnetbyname 1 ; # OP_GNBYNAME
693 getnetbyaddr 1,2 ; # OP_GNBYADDR
694 getnetent ; # OP_GNETENT
695 getprotobyname 1; # OP_GPBYNAME
696 getprotobynumber 1; # OP_GPBYNUMBER
697 getprotoent ; # OP_GPROTOENT
698 getservbyname 1,2; # OP_GSBYNAME
699 getservbyport 1,2; # OP_GSBYPORT
700 getservent ; # OP_GSERVENT
702 # some functions may not be there, so we exit without running
706 Useless use of getsockname in void context at - line 24.
707 Useless use of getpeername in void context at - line 25.
708 Useless use of gethostbyname in void context at - line 26.
709 Useless use of gethostbyaddr in void context at - line 27.
710 Useless use of gethostent in void context at - line 28.
711 Useless use of getnetbyname in void context at - line 29.
712 Useless use of getnetbyaddr in void context at - line 30.
713 Useless use of getnetent in void context at - line 31.
714 Useless use of getprotobyname in void context at - line 32.
715 Useless use of getprotobynumber in void context at - line 33.
716 Useless use of getprotoent in void context at - line 34.
717 Useless use of getservbyname in void context at - line 35.
718 Useless use of getservbyport in void context at - line 36.
719 Useless use of getservent in void context at - line 37.
722 use warnings 'void' ;
733 Useless use of a variable in void context at - line 3.
734 Useless use of a variable in void context at - line 4.
735 Useless use of a variable in void context at - line 5.
736 Useless use of a variable in void context at - line 6.
739 use warnings 'void' ;
742 "x" . "y"; # optimized to OP_CONST
743 2 + 2; # optimized to OP_CONST
744 use constant U => undef;
747 5 || print "bad\n"; # test OPpCONST_SHORTCIRCUIT
748 print "boo\n" if U; # test OPpCONST_SHORTCIRCUIT
749 if($foo){}elsif(""){} # test OPpCONST_SHORTCIRCUIT
753 "x" . "y"; # optimized to OP_CONST
754 2 + 2; # optimized to OP_CONST
756 Useless use of a constant ("abc") in void context at - line 3.
757 Useless use of a constant (7) in void context at - line 4.
758 Useless use of a constant ("xy") in void context at - line 5.
759 Useless use of a constant (4) in void context at - line 6.
760 Useless use of a constant (undef) in void context at - line 8.
761 Useless use of a constant ("\"\t\n") in void context at - line 9.
765 use open qw( :utf8 :std );
766 use warnings 'void' ;
768 "Ẋ" . "ƴ"; # optimized to OP_CONST
769 FOO; # Bareword optimized to OP_CONST
770 use constant ů => undef;
772 5 || print "bad\n"; # test OPpCONST_SHORTCIRCUIT
773 print "boo\n" if ů; # test OPpCONST_SHORTCIRCUIT
776 "Ẋ" . "ƴ"; # optimized to OP_CONST
778 Useless use of a constant ("\340\x{1e06}c") in void context at - line 5.
779 Useless use of a constant ("\x{1e8a}\x{1b4}") in void context at - line 6.
780 Useless use of a constant ("\x{ff26}\x{ff2f}\x{ff2f}") in void context at - line 7.
781 Useless use of a constant (undef) in void context at - line 9.
785 use warnings 'misc' ;
786 my $a ; my @a = () ; my %a = () ; my $b = \@a ; my $c = \%a ;my $d = 'test';
804 my $a ; my @a = () ; my %a = () ; my $b = \@a ; my $c = \%a ; my $d = 'test';
822 Applying pattern match (m//) to @a will act on scalar(@a) at - line 5.
823 Applying substitution (s///) to @a2 will act on scalar(@a2) at - line 6.
824 Applying transliteration (tr///) to @a3 will act on scalar(@a3) at - line 7.
825 Applying pattern match (m//) to @array will act on scalar(@array) at - line 8.
826 Applying substitution (s///) to @array will act on scalar(@array) at - line 9.
827 Applying transliteration (tr///) to @array will act on scalar(@array) at - line 10.
828 Applying pattern match (m//) to %a will act on scalar(%a) at - line 11.
829 Applying substitution (s///) to %a2 will act on scalar(%a2) at - line 12.
830 Applying transliteration (tr///) to %a3 will act on scalar(%a3) at - line 13.
831 Applying pattern match (m//) to %hash will act on scalar(%hash) at - line 14.
832 Applying substitution (s///) to %hash will act on scalar(%hash) at - line 15.
833 Applying transliteration (tr///) to %hash will act on scalar(%hash) at - line 16.
834 Useless use of /d modifier in transliteration operator at - line 17.
835 Replacement list is longer than search list at - line 18.
836 Can't modify array dereference in substitution (s///) at - line 6, near "s/a/b/ ;"
837 BEGIN not safe after errors--compilation aborted at - line 21.
840 use warnings 'parenthesis' ;
842 my @foo,%bar, $quux; # there's a TAB here
844 no warnings 'parenthesis' ;
847 Parentheses missing around "my" list at - line 3.
848 Parentheses missing around "my" list at - line 4.
851 use warnings 'parenthesis' ;
853 no warnings 'parenthesis' ;
856 Parentheses missing around "our" list at - line 3.
859 use warnings 'parenthesis' ;
860 local $a, $b = (1,2);
862 no warnings 'parenthesis' ;
863 local $c, $d = (1,2);
865 Parentheses missing around "local" list at - line 3.
866 Parentheses missing around "local" list at - line 4.
869 use warnings 'bareword' ;
871 no warnings 'bareword' ;
874 Bareword found in conditional at - line 3.
880 use warnings 'misc' ;
882 $x = 1 if $x = <FH> ;
886 $x = 1 if $x = <FH> ;
890 Value of <HANDLE> construct can be "0"; test with defined() at - line 4.
891 Value of <HANDLE> construct can be "0"; test with defined() at - line 5.
894 use warnings 'misc' ;
896 $x = 1 if $x = readdir FH ;
900 $x = 1 if $x = readdir FH ;
905 Value of readdir() operator can be "0"; test with defined() at - line 4.
906 Value of readdir() operator can be "0"; test with defined() at - line 5.
909 use warnings 'misc' ;
918 Value of glob construct can be "0"; test with defined() at - line 3.
919 Value of glob construct can be "0"; test with defined() at - line 4.
922 use warnings 'misc' ;
924 $x = 1 if $x = each %a ;
926 $x = 1 if $x = each %a ;
928 Value of each() operator can be "0"; test with defined() at - line 4.
931 use warnings 'misc' ;
932 $x = 1 while $x = <*> and 0 ;
934 $x = 1 while $x = <*> and 0 ;
936 Value of glob construct can be "0"; test with defined() at - line 3.
939 use warnings 'misc' ;
941 $x = 1 while $x = readdir FH and 0 ;
943 $x = 1 while $x = readdir FH and 0 ;
946 Value of readdir() operator can be "0"; test with defined() at - line 4.
951 ($_ = <FH>) // ($_ = 1);
957 use warnings 'redefine' ;
960 sub fred { # warning should be for this line
962 no warnings 'redefine' ;
967 Subroutine fred redefined at - line 4.
968 Subroutine fred redefined at - line 5.
971 use warnings 'redefine' ;
974 no warnings 'redefine' ;
977 Constant subroutine fred redefined at - line 4.
983 Constant subroutine fred redefined at - line 3.
987 *fred = sub () { 2 };
989 Constant subroutine main::fred redefined at - line 3.
992 use feature "lexical_subs", "state";
996 sub george () { 2 } # should *not* produce redef warnings by default
997 state sub phred () { 1 }
999 state sub jorge { 1 }
1000 sub jorge () { 2 } # should *not* produce redef warnings by default
1002 The lexical_subs feature is experimental at - line 3.
1003 Prototype mismatch: sub fred () vs none at - line 4.
1004 Constant subroutine fred redefined at - line 4.
1005 The lexical_subs feature is experimental at - line 5.
1006 Prototype mismatch: sub george: none vs () at - line 6.
1007 The lexical_subs feature is experimental at - line 7.
1008 Prototype mismatch: sub phred () vs none at - line 8.
1009 Constant subroutine phred redefined at - line 8.
1010 The lexical_subs feature is experimental at - line 9.
1011 Prototype mismatch: sub jorge: none vs () at - line 10.
1014 no warnings 'redefine' ;
1020 no warnings 'redefine' ;
1022 *fred = sub () { 2 };
1026 use warnings 'redefine' ;
1031 no warnings 'redefine' ;
1035 Format FRED redefined at - line 5.
1037 # op.c [Perl_ck_fun]
1044 no warnings 'experimental::autoderef' ;
1051 push on reference is experimental at - line 3.
1052 pop on reference is experimental at - line 4.
1053 shift on reference is experimental at - line 5.
1054 unshift on reference is experimental at - line 6.
1055 splice on reference is experimental at - line 7.
1058 use warnings 'exec' ;
1062 Statement unlikely to be reached at - line 4.
1063 (Maybe you meant system() when you said exec()?)
1065 # op.c, no warning if exec isn't a statement.
1066 use warnings 'exec' ;
1067 $a || exec "$^X -e 1" ;
1074 defined(@array) is deprecated at - line 2.
1075 (Maybe you should just omit the defined()?)
1080 defined(@array) is deprecated at - line 2.
1081 (Maybe you should just omit the defined()?)
1084 defined(@a = (1,2,3));
1086 defined(@array) is deprecated at - line 2.
1087 (Maybe you should just omit the defined()?)
1092 defined(%hash) is deprecated at - line 2.
1093 (Maybe you should just omit the defined()?)
1098 defined(%hash) is deprecated at - line 2.
1099 (Maybe you should just omit the defined()?)
1102 no warnings 'exec' ;
1111 use constant foo=>bar; sub foo(@);
1112 use constant bav=>bar; sub bav(); # no warning
1115 Prototype mismatch: sub main::fred () vs ($) at - line 3.
1116 Prototype mismatch: sub foo () vs (@) at - line 4.
1117 Prototype mismatch: sub btu: none vs () at - line 6.
1121 use open qw( :utf8 :std );
1125 Prototype mismatch: sub main::frèd () vs ($) at - line 5.
1129 use open qw( :utf8 :std );
1131 eval "sub fòò (@\$\0) {}";
1133 Prototype after '@' for main::fòò : @$\0 at (eval 1) line 1.
1134 Illegal character in prototype for main::fòò : @$\0 at (eval 1) line 1.
1138 use open qw( :utf8 :std );
1140 eval "sub foo (@\0) {}";
1142 Prototype after '@' for main::foo : @\0 at (eval 1) line 1.
1143 Illegal character in prototype for main::foo : @\0 at (eval 1) line 1.
1147 use open qw( :utf8 :std );
1149 BEGIN { $::{"foo"} = "\@\$\0L\351on" }
1150 BEGIN { eval "sub foo (@\$\0L\x{c3}\x{a9}on) {}"; }
1152 Prototype after '@' for main::foo : @$\x{0}L... at (eval 1) line 1.
1153 Illegal character in prototype for main::foo : @$\x{0}L... at (eval 1) line 1.
1157 use open qw( :utf8 :std );
1159 BEGIN { eval "sub foo (@\0) {}"; }
1161 Prototype after '@' for main::foo : @\0 at (eval 1) line 1.
1162 Illegal character in prototype for main::foo : @\0 at (eval 1) line 1.
1166 eval "sub foo (@\xAB) {}";
1168 Prototype after '@' for main::foo : @\x{ab} at (eval 1) line 1.
1169 Illegal character in prototype for main::foo : @\x{ab} at (eval 1) line 1.
1173 use open qw( :utf8 :std );
1175 BEGIN { eval "sub foo (@\x{30cb}) {}"; }
1177 Prototype after '@' for main::foo : @\x{30cb} at (eval 1) line 1.
1178 Illegal character in prototype for main::foo : @\x{30cb} at (eval 1) line 1.
1182 use open qw( :utf8 :std );
1184 BEGIN { $::{"foo"} = "\x{30cb}" }
1185 BEGIN { eval "sub foo {}"; }
1187 Prototype mismatch: sub main::foo (ニ) vs none at (eval 1) line 1.
1194 no warnings 'prototype' ;
1197 use warnings 'prototype' ;
1204 Prototype mismatch: sub main::fred () vs ($) at - line 4.
1205 Prototype mismatch: sub main::freD () vs ($) at - line 11.
1206 Prototype mismatch: sub main::FRED () vs ($) at - line 14.
1208 # op.c [S_simplify_sort]
1210 my @tests = split /^/, '
1211 sort {$a <=> $b} @a;
1212 sort {$a cmp $b} @a;
1213 { use integer; sort {$a <=> $b} @a}
1214 sort {$b <=> $a} @a;
1215 sort {$b cmp $a} @a;
1216 { use integer; sort {$b <=> $a} @a}
1218 for my $pragma ('use warnings "syntax";', '') {
1219 for my $vars ('', 'my $a;', 'my $b;', 'my ($a,$b);') {
1220 for my $inner_stmt ('', 'print;', 'func();') {
1221 eval "#line " . ++$line . "01 -\n$pragma\n$vars"
1222 . join "", map s/sort \{\K/$inner_stmt/r, @tests;
1228 use warnings 'syntax';
1230 # These used to be errors!
1231 sort { ; } $a <=> $b;
1232 sort { ; } $a, "<=>";
1233 sort { ; } $a, $cmp;
1234 sort $a, $b if $cmpany_name;
1238 "my $a" used in sort comparison at - line 403.
1239 "my $a" used in sort comparison at - line 404.
1240 "my $a" used in sort comparison at - line 405.
1241 "my $a" used in sort comparison at - line 406.
1242 "my $a" used in sort comparison at - line 407.
1243 "my $a" used in sort comparison at - line 408.
1244 "my $a" used in sort comparison at - line 503.
1245 "my $a" used in sort comparison at - line 504.
1246 "my $a" used in sort comparison at - line 505.
1247 "my $a" used in sort comparison at - line 506.
1248 "my $a" used in sort comparison at - line 507.
1249 "my $a" used in sort comparison at - line 508.
1250 "my $a" used in sort comparison at - line 603.
1251 "my $a" used in sort comparison at - line 604.
1252 "my $a" used in sort comparison at - line 605.
1253 "my $a" used in sort comparison at - line 606.
1254 "my $a" used in sort comparison at - line 607.
1255 "my $a" used in sort comparison at - line 608.
1256 "my $b" used in sort comparison at - line 703.
1257 "my $b" used in sort comparison at - line 704.
1258 "my $b" used in sort comparison at - line 705.
1259 "my $b" used in sort comparison at - line 706.
1260 "my $b" used in sort comparison at - line 707.
1261 "my $b" used in sort comparison at - line 708.
1262 "my $b" used in sort comparison at - line 803.
1263 "my $b" used in sort comparison at - line 804.
1264 "my $b" used in sort comparison at - line 805.
1265 "my $b" used in sort comparison at - line 806.
1266 "my $b" used in sort comparison at - line 807.
1267 "my $b" used in sort comparison at - line 808.
1268 "my $b" used in sort comparison at - line 903.
1269 "my $b" used in sort comparison at - line 904.
1270 "my $b" used in sort comparison at - line 905.
1271 "my $b" used in sort comparison at - line 906.
1272 "my $b" used in sort comparison at - line 907.
1273 "my $b" used in sort comparison at - line 908.
1274 "my $a" used in sort comparison at - line 1003.
1275 "my $b" used in sort comparison at - line 1003.
1276 "my $a" used in sort comparison at - line 1004.
1277 "my $b" used in sort comparison at - line 1004.
1278 "my $a" used in sort comparison at - line 1005.
1279 "my $b" used in sort comparison at - line 1005.
1280 "my $b" used in sort comparison at - line 1006.
1281 "my $a" used in sort comparison at - line 1006.
1282 "my $b" used in sort comparison at - line 1007.
1283 "my $a" used in sort comparison at - line 1007.
1284 "my $b" used in sort comparison at - line 1008.
1285 "my $a" used in sort comparison at - line 1008.
1286 "my $a" used in sort comparison at - line 1103.
1287 "my $b" used in sort comparison at - line 1103.
1288 "my $a" used in sort comparison at - line 1104.
1289 "my $b" used in sort comparison at - line 1104.
1290 "my $a" used in sort comparison at - line 1105.
1291 "my $b" used in sort comparison at - line 1105.
1292 "my $b" used in sort comparison at - line 1106.
1293 "my $a" used in sort comparison at - line 1106.
1294 "my $b" used in sort comparison at - line 1107.
1295 "my $a" used in sort comparison at - line 1107.
1296 "my $b" used in sort comparison at - line 1108.
1297 "my $a" used in sort comparison at - line 1108.
1298 "my $a" used in sort comparison at - line 1203.
1299 "my $b" used in sort comparison at - line 1203.
1300 "my $a" used in sort comparison at - line 1204.
1301 "my $b" used in sort comparison at - line 1204.
1302 "my $a" used in sort comparison at - line 1205.
1303 "my $b" used in sort comparison at - line 1205.
1304 "my $b" used in sort comparison at - line 1206.
1305 "my $a" used in sort comparison at - line 1206.
1306 "my $b" used in sort comparison at - line 1207.
1307 "my $a" used in sort comparison at - line 1207.
1308 "my $b" used in sort comparison at - line 1208.
1309 "my $a" used in sort comparison at - line 1208.
1311 # op.c [S_simplify_sort]
1312 use warnings 'syntax'; use 5.01;
1314 sort { $a <=> $b } ();
1316 "state $a" used in sort comparison at - line 4.
1318 # op.c [Perl_ck_cmp]
1319 use warnings 'syntax' ;
1320 no warnings 'deprecated';
1357 $[ used in numeric lt (<) (did you mean $] ?) at - line 4.
1358 $[ used in numeric gt (>) (did you mean $] ?) at - line 5.
1359 $[ used in numeric le (<=) (did you mean $] ?) at - line 6.
1360 $[ used in numeric ge (>=) (did you mean $] ?) at - line 7.
1361 $[ used in numeric lt (<) (did you mean $] ?) at - line 8.
1362 $[ used in numeric gt (>) (did you mean $] ?) at - line 9.
1363 $[ used in numeric le (<=) (did you mean $] ?) at - line 10.
1364 $[ used in numeric ge (>=) (did you mean $] ?) at - line 11.
1365 $[ used in numeric lt (<) (did you mean $] ?) at - line 13.
1366 $[ used in numeric gt (>) (did you mean $] ?) at - line 14.
1367 $[ used in numeric le (<=) (did you mean $] ?) at - line 15.
1368 $[ used in numeric ge (>=) (did you mean $] ?) at - line 16.
1369 $[ used in numeric lt (<) (did you mean $] ?) at - line 17.
1370 $[ used in numeric gt (>) (did you mean $] ?) at - line 18.
1371 $[ used in numeric le (<=) (did you mean $] ?) at - line 19.
1372 $[ used in numeric ge (>=) (did you mean $] ?) at - line 20.
1374 # op.c [Perl_ck_each]
1379 no warnings 'experimental::autoderef' ;
1384 keys on reference is experimental at - line 3.
1385 values on reference is experimental at - line 4.
1386 each on reference is experimental at - line 5.
1388 # op.c [Perl_ck_length]
1389 use warnings 'syntax' ;
1398 length() used on @a (did you mean "scalar(@a)"?) at - line 3.
1399 length() used on %b (did you mean "scalar(keys %b)"?) at - line 4.
1400 length() used on @array (did you mean "scalar(@array)"?) at - line 5.
1401 length() used on %hash (did you mean "scalar(keys %hash)"?) at - line 6.
1402 length() used on %h (did you mean "scalar(keys %h)"?) at - line 8.
1403 length() used on @g (did you mean "scalar(@g)"?) at - line 9.
1406 use warnings 'syntax' ;
1407 join /---/, 'x', 'y', 'z';
1409 /---/ should probably be written as "---" at - line 3.
1413 use open qw( :utf8 :std );
1414 use warnings 'syntax' ;
1415 join /~~~/, 'x', 'y', 'z';
1417 /~~~/ should probably be written as "~~~" at - line 5.
1420 use warnings 'prototype' ;
1423 no warnings 'prototype' ;
1427 main::fred() called too early to check prototype at - line 3.
1429 # op.c [Perl_newATTRSUB]
1431 use warnings 'void' ;
1432 BEGIN { $| = 1; print "in begin\n"; }
1433 CHECK { print "in check\n"; }
1434 INIT { print "in init\n"; }
1435 END { print "in end\n"; }
1436 print "in mainline\n";
1440 delete $INC{"abc.pm"};
1449 Too late to run CHECK block at abc.pm line 3.
1450 Too late to run INIT block at abc.pm line 4.
1453 Too late to run CHECK block at abc.pm line 3.
1454 Too late to run INIT block at abc.pm line 4.
1460 # op.c [Perl_newATTRSUB]
1462 no warnings 'void' ;
1463 BEGIN { $| = 1; print "in begin\n"; }
1464 CHECK { print "in check\n"; }
1465 INIT { print "in init\n"; }
1466 END { print "in end\n"; }
1467 print "in mainline\n";
1482 use warnings 'syntax' ;
1485 no warnings 'syntax' ;
1489 Useless use of push with no values at - line 4.
1490 Useless use of unshift with no values at - line 5.
1493 # 20020401 mjd@plover.com at suggestion of jfriedl@yahoo.com
1494 use warnings 'regexp';
1495 split /blah/g, "blah";
1496 no warnings 'regexp';
1497 split /blah/g, "blah";
1499 Use of /g modifier is meaningless in split at - line 4.
1502 use warnings 'precedence';
1509 $a = $b <=> $c & $d;
1510 $a &= $b == $c; $a |= $b == $c; $a ^= $b == $c; # shouldn't warn
1511 no warnings 'precedence';
1518 $a = $b <=> $c & $d;
1520 Possible precedence problem on bitwise & operator at - line 3.
1521 Possible precedence problem on bitwise ^ operator at - line 4.
1522 Possible precedence problem on bitwise | operator at - line 5.
1523 Possible precedence problem on bitwise & operator at - line 6.
1524 Possible precedence problem on bitwise ^ operator at - line 7.
1525 Possible precedence problem on bitwise | operator at - line 8.
1526 Possible precedence problem on bitwise & operator at - line 9.
1530 use warnings 'precedence';
1537 $a = $b <=> $c & $d;
1538 no warnings 'precedence';
1545 $a = $b <=> $c & $d;
1547 Possible precedence problem on bitwise & operator at - line 4.
1548 Possible precedence problem on bitwise ^ operator at - line 5.
1549 Possible precedence problem on bitwise | operator at - line 6.
1550 Possible precedence problem on bitwise & operator at - line 7.
1551 Possible precedence problem on bitwise ^ operator at - line 8.
1552 Possible precedence problem on bitwise | operator at - line 9.
1553 Possible precedence problem on bitwise & operator at - line 10.
1557 # ok => local() has desired effect;
1558 # ignore=> local() silently ignored
1560 use warnings 'syntax';
1562 local(undef); # OP_UNDEF ignore
1563 sub lval : lvalue {};
1564 local(lval()); # OP_ENTERSUB
1565 local($x **= 1); # OP_POW
1566 local($x *= 1); # OP_MULTIPLY
1567 local($x /= 1); # OP_DIVIDE
1568 local($x %= 1); # OP_MODULO
1569 local($x x= 1); # OP_REPEAT
1570 local($x += 1); # OP_ADD
1571 local($x -= 1); # OP_SUBTRACT
1572 local($x .= 1); # OP_CONCAT
1573 local($x <<= 1); # OP_LEFT_SHIFT
1574 local($x >>= 1); # OP_RIGHT_SHIFT
1575 local($x &= 1); # OP_BIT_AND
1576 local($x ^= 1); # OP_BIT_XOR
1577 local($x |= 1); # OP_BIT_OR
1580 local($x *= 1); # OP_I_MULTIPLY
1581 local($x /= 1); # OP_I_DIVIDE
1582 local($x %= 1); # OP_I_MODULO
1583 local($x += 1); # OP_I_ADD
1584 local($x -= 1); # OP_I_SUBTRACT
1586 local($x?$y:$z) = 1; # OP_COND_EXPR ok
1587 # these two are fatal run-time errors instead
1588 #local(@$a); # OP_RV2AV ok
1589 #local(%$a); # OP_RV2HV ok
1590 local(*a); # OP_RV2GV ok
1591 local(@a[1,2]); # OP_ASLICE ok
1592 local(@a{1,2}); # OP_HSLICE ok
1593 local(@a = (1,2)); # OP_AASSIGN
1594 local($$x); # OP_RV2SV ok
1595 local($#a); # OP_AV2ARYLEN
1596 local($x = 1); # OP_SASSIGN
1597 local($x &&= 1); # OP_ANDASSIGN
1598 local($x ||= 1); # OP_ORASSIGN
1599 local($x //= 1); # OP_DORASSIGN
1600 local($a[0]); # OP_AELEMFAST ok
1602 local(substr($x,0,1)); # OP_SUBSTR
1603 local(pos($x)); # OP_POS
1604 local(vec($x,0,1)); # OP_VEC
1605 local($a[$b]); # OP_AELEM ok
1606 local($a{$b}); # OP_HELEM ok
1608 no warnings 'syntax';
1610 Useless localization of subroutine entry at - line 10.
1611 Useless localization of exponentiation (**) at - line 11.
1612 Useless localization of multiplication (*) at - line 12.
1613 Useless localization of division (/) at - line 13.
1614 Useless localization of modulus (%) at - line 14.
1615 Useless localization of repeat (x) at - line 15.
1616 Useless localization of addition (+) at - line 16.
1617 Useless localization of subtraction (-) at - line 17.
1618 Useless localization of concatenation (.) or string at - line 18.
1619 Useless localization of left bitshift (<<) at - line 19.
1620 Useless localization of right bitshift (>>) at - line 20.
1621 Useless localization of bitwise and (&) at - line 21.
1622 Useless localization of bitwise xor (^) at - line 22.
1623 Useless localization of bitwise or (|) at - line 23.
1624 Useless localization of integer multiplication (*) at - line 26.
1625 Useless localization of integer division (/) at - line 27.
1626 Useless localization of integer modulus (%) at - line 28.
1627 Useless localization of integer addition (+) at - line 29.
1628 Useless localization of integer subtraction (-) at - line 30.
1629 Useless localization of list assignment at - line 39.
1630 Useless localization of array length at - line 41.
1631 Useless localization of scalar assignment at - line 42.
1632 Useless localization of logical and assignment (&&=) at - line 43.
1633 Useless localization of logical or assignment (||=) at - line 44.
1634 Useless localization of defined or assignment (//=) at - line 45.
1635 Useless localization of substr at - line 48.
1636 Useless localization of match position at - line 49.
1637 Useless localization of vec at - line 50.
1644 my ($x5,@x6, %x7) if 0;
1647 # these shouldn't warn
1651 if (my $w2) { $a=1 }
1652 if ($a && (my $w3 = 1)) {$a = 2}
1655 Deprecated use of my() in false conditional at - line 2.
1656 Deprecated use of my() in false conditional at - line 3.
1657 Deprecated use of my() in false conditional at - line 4.
1658 Deprecated use of my() in false conditional at - line 5.
1659 Deprecated use of my() in false conditional at - line 6.
1660 Deprecated use of my() in false conditional at - line 7.
1661 Deprecated use of my() in false conditional at - line 8.
1666 use warnings 'deprecated';
1669 no warnings 'deprecated';
1673 Use of assignment to $[ is deprecated at - line 2.
1674 Use of assignment to $[ is deprecated at - line 3.
1675 Use of assignment to $[ is deprecated at - line 5.
1676 Use of assignment to $[ is deprecated at - line 6.
1679 use warnings 'void';
1680 @x = split /y/, "z";
1681 $x = split /y/, "z";
1684 @x = split /y/, "z";
1685 $x = split /y/, "z";
1688 Useless use of split in void context at - line 5.
1691 use warnings 'redefine' ;
1693 use open qw( :utf8 :std );
1696 no warnings 'redefine' ;
1699 Subroutine frèd redefined at - line 6.
1702 use warnings 'redefine' ;
1704 use open qw( :utf8 :std );
1707 no warnings 'redefine' ;
1710 Constant subroutine frèd redefined at - line 6.
1714 use open qw( :utf8 :std );
1718 Constant subroutine frèd redefined at - line 5.
1722 use open qw( :utf8 :std );
1724 *frèd = sub () { 2 };
1726 Constant subroutine main::frèd redefined at - line 5.
1729 use warnings 'redefine' ;
1731 use open qw( :utf8 :std );
1734 no warnings 'redefine' ;
1737 Subroutine ᚠርƊ redefined at - line 6.
1740 use warnings 'redefine' ;
1742 use open qw( :utf8 :std );
1745 no warnings 'redefine' ;
1748 Constant subroutine ᚠርƊ redefined at - line 6.
1752 use open qw( :utf8 :std );
1756 Constant subroutine ᚠርƊ redefined at - line 5.
1760 use open qw( :utf8 :std );
1762 *ᚠርƊ = sub () { 2 };
1764 Constant subroutine main::ᚠርƊ redefined at - line 5.
1767 sub DynaLoader::dl_error {};
1769 # We're testing that the warnings report the same line number:
1770 eval <<'EOC' or die $@;
1772 DynaLoader::boot_DynaLoader("DynaLoader");
1775 eval <<'EOC' or die $@;
1777 DynaLoader::boot_DynaLoader("DynaLoader");
1783 \ASubroutine DynaLoader::dl_error redefined at \(eval 1\) line 2\.
1785 Subroutine DynaLoader::dl_error redefined at \(eval 2\) line 2\.
1789 sub do_warn_1 { return $a or $b; }
1790 sub do_warn_2 { return $a and $b; }
1791 sub do_warn_3 { return $a xor $b; }
1792 sub do_warn_4 { die $a or $b; }
1793 sub do_warn_5 { die $a and $b; }
1794 sub do_warn_6 { die $a xor $b; }
1795 sub do_warn_7 { exit $a or $b; }
1796 sub do_warn_8 { exit $a and $b; }
1797 sub do_warn_9 { exit $a xor $b; }
1799 # Since exit is an unary operator, it is even stronger than
1801 sub do_warn_10 { exit $a || $b; }
1802 sub do_warn_11 { exit $a && $b; }
1804 sub do_warn_12 { goto $a or $b; }
1805 sub do_warn_13 { goto $a and $b; }
1806 sub do_warn_14 { goto $a xor $b; }
1807 sub do_warn_15 { next $a or $b while(1); }
1808 sub do_warn_16 { next $a and $b while(1); }
1809 sub do_warn_17 { next $a xor $b while(1); }
1810 sub do_warn_18 { last $a or $b while(1); }
1811 sub do_warn_19 { last $a and $b while(1); }
1812 sub do_warn_20 { last $a xor $b while(1); }
1813 sub do_warn_21 { redo $a or $b while(1); }
1814 sub do_warn_22 { redo $a and $b while(1); }
1815 sub do_warn_23 { redo $a xor $b while(1); }
1816 # These get re-written to "(return/die $a) and $b"
1817 sub do_warn_24 { $b if return $a; }
1818 sub do_warn_25 { $b if die $a; }
1820 Possible precedence issue with control flow operator at - line 3.
1821 Possible precedence issue with control flow operator at - line 4.
1822 Possible precedence issue with control flow operator at - line 5.
1823 Possible precedence issue with control flow operator at - line 6.
1824 Possible precedence issue with control flow operator at - line 7.
1825 Possible precedence issue with control flow operator at - line 8.
1826 Possible precedence issue with control flow operator at - line 9.
1827 Possible precedence issue with control flow operator at - line 10.
1828 Possible precedence issue with control flow operator at - line 11.
1829 Possible precedence issue with control flow operator at - line 15.
1830 Possible precedence issue with control flow operator at - line 16.
1831 Possible precedence issue with control flow operator at - line 18.
1832 Possible precedence issue with control flow operator at - line 19.
1833 Possible precedence issue with control flow operator at - line 20.
1834 Possible precedence issue with control flow operator at - line 21.
1835 Possible precedence issue with control flow operator at - line 22.
1836 Possible precedence issue with control flow operator at - line 23.
1837 Possible precedence issue with control flow operator at - line 24.
1838 Possible precedence issue with control flow operator at - line 25.
1839 Possible precedence issue with control flow operator at - line 26.
1840 Possible precedence issue with control flow operator at - line 27.
1841 Possible precedence issue with control flow operator at - line 28.
1842 Possible precedence issue with control flow operator at - line 29.
1843 Possible precedence issue with control flow operator at - line 31.
1844 Possible precedence issue with control flow operator at - line 32.
1847 # (same as above, except these should not warn)
1848 use constant FEATURE => 1;
1849 use constant MISSING_FEATURE => 0;
1851 sub dont_warn_1 { MISSING_FEATURE and return or dont_warn_3(); }
1852 sub dont_warn_2 { FEATURE || return and dont_warn_3(); }
1853 sub dont_warn_3 { not FEATURE and return or dont_warn_3(); }
1854 sub dont_warn_4 { !MISSING_FEATURE || return and dont_warn_3(); }
1855 sub dont_warn_5 { MISSING_FEATURE and die or dont_warn_3(); }
1856 sub dont_warn_6 { FEATURE || die and dont_warn_3(); }
1857 sub dont_warn_7 { not FEATURE and die or dont_warn_3(); }
1858 sub dont_warn_8 { !MISSING_FEATURE || die and dont_warn_3(); }
1859 sub dont_warn_9 { MISSING_FEATURE and goto $a or dont_warn_3(); }
1860 sub dont_warn_10 { FEATURE || goto $a and dont_warn_3(); }
1861 sub dont_warn_11 { not FEATURE and goto $a or dont_warn_3(); }
1862 sub dont_warn_12 { !MISSING_FEATURE || goto $a and dont_warn_3(); }
1864 sub dont_warn_13 { MISSING_FEATURE and exit $a or dont_warn_3(); }
1865 sub dont_warn_14 { FEATURE || exit $a and dont_warn_3(); }
1866 sub dont_warn_15 { not FEATURE and exit $a or dont_warn_3(); }
1867 sub dont_warn_16 { !MISSING_FEATURE || exit $a and dont_warn_3(); }
1869 sub dont_warn_17 { MISSING_FEATURE and next or dont_warn_3() while(1); }
1870 sub dont_warn_18 { FEATURE || next and dont_warn_3() while(1); }
1871 sub dont_warn_19 { not FEATURE and next or dont_warn_3() while(1); }
1872 sub dont_warn_20 { !MISSING_FEATURE || next and dont_warn_3() while(1); }
1873 sub dont_warn_21 { MISSING_FEATURE and redo or dont_warn_3() while(1); }
1874 sub dont_warn_22 { FEATURE || redo and dont_warn_3() while(1); }
1875 sub dont_warn_23 { not FEATURE and redo or dont_warn_3() while(1); }
1876 sub dont_warn_24 { !MISSING_FEATURE || redo and dont_warn_3() while(1); }
1877 sub dont_warn_25 { MISSING_FEATURE and last or dont_warn_3() while(1); }
1878 sub dont_warn_26 { FEATURE || last and dont_warn_3() while(1); }
1879 sub dont_warn_27 { not FEATURE and last or dont_warn_3() while(1); }
1880 sub dont_warn_28 { !MISSING_FEATURE || last and dont_warn_3() while(1); }
1882 # These are weird, but at least not ambiguous.
1883 sub dont_warn_29 { return ($a or $b); }
1884 sub dont_warn_30 { return ($a and $b); }
1885 sub dont_warn_31 { return ($a xor $b); }
1886 sub dont_warn_32 { die ($a or $b); }
1887 sub dont_warn_33 { die ($a and $b); }
1888 sub dont_warn_34 { die ($a xor $b); }
1889 sub dont_warn_35 { goto ($a or $b); }
1890 sub dont_warn_36 { goto ($a and $b); }
1891 sub dont_warn_37 { goto ($a xor $b); }
1892 sub dont_warn_38 { next ($a or $b) while(1); }
1893 sub dont_warn_39 { next ($a and $b) while(1); }
1894 sub dont_warn_40 { next ($a xor $b) while(1); }
1895 sub dont_warn_41 { last ($a or $b) while(1); }
1896 sub dont_warn_42 { last ($a and $b) while(1); }
1897 sub dont_warn_43 { last ($a xor $b) while(1); }
1898 sub dont_warn_44 { redo ($a or $b) while(1); }
1899 sub dont_warn_45 { redo ($a and $b) while(1); }
1900 sub dont_warn_46 { redo ($a xor $b) while(1); }
1903 use feature "signatures";
1907 $bbb = sub ($a) { 4 };
1909 The signatures feature is experimental at - line 3.
1910 The signatures feature is experimental at - line 5.
1912 no warnings "experimental::signatures";
1913 use feature "signatures";
1917 $bbb = sub ($a) { 4 };