3 Found = in conditional, should be ==
6 Scalar value %.*s better written as $%.*s"
10 Useless use of time in void context
11 Useless use of a variable in void context
12 Useless use of a constant in void context
17 Useless use of sort in scalar context
20 Applying %s to %s will act on scalar(%s)
21 my $a ; my @a = () ; my %a = () ; my $b = \@a ; my $c = \%a ;
36 Parentheses missing around "my" list at -e line 1.
39 Parentheses missing around "local" list at -e line 1.
42 Bareword found in conditional at -e line 1.
43 use warnings 'bareword'; my $x = print(ABC || 1);
45 Value of %s may be \"0\"; use \"defined\"
47 $x = 1 while $x = <FH> ;
49 Subroutine fred redefined at -e line 1.
50 sub fred{1;} sub fred{1;}
52 Constant subroutine %s redefined
53 sub fred() {1;} sub fred() {1;}
55 Format FRED redefined at /tmp/x line 5.
61 Statement unlikely to be reached
62 (Maybe you meant system() when you said exec()?
65 Can't use defined(@array) (Maybe you should just omit the defined()?)
67 defined (@a = (1,2,3)) ;
69 Can't use defined(%hash) (Maybe you should just omit the defined()?)
72 "my %s" used in sort comparison
74 $[ used in comparison (did you mean $] ?)
76 length() used on @array (did you mean "scalar(@array)"?)
77 length() used on %hash (did you mean "scalar(keys %hash)"?)
79 /---/ should probably be written as "---"
82 %s() called too early to check prototype [Perl_peep]
83 fred() ; sub fred ($$) {}
86 Package '%s' not found (did you use the incorrect case?)
88 Use of /g modifier is meaningless in split
90 The bitwise feature is experimental [Perl_ck_bitop]
92 Possible precedence problem on bitwise %c operator [Perl_ck_bitop]
96 Prototype mismatch: [cv_ckproto]
100 oops: oopsAV [oopsAV] TODO
101 oops: oopsHV [oopsHV] TODO
105 use warnings 'syntax' ;
109 no warnings 'syntax' ;
114 Found = in conditional, should be == at - line 3.
115 Found = in conditional, should be == at - line 4.
118 use warnings 'syntax' ;
119 use constant foo => 1;
121 no warnings 'syntax' ;
126 # NAME unless with assignment as condition
127 use warnings 'syntax';
133 Found = in conditional, should be == at - line 3.
134 Found = in conditional, should be == at - line 4.
137 # NAME while with assignment as condition
138 use warnings 'syntax';
144 Found = in conditional, should be == at - line 3.
145 Found = in conditional, should be == at - line 4.
148 # NAME until with assignment as condition
149 use warnings 'syntax';
155 Found = in conditional, should be == at - line 3.
156 Found = in conditional, should be == at - line 4.
159 use warnings 'syntax' ;
172 no warnings 'syntax' ;
178 Scalar value @a[3] better written as $a[3] at - line 3.
179 Scalar value @a{3} better written as $a{3} at - line 4.
180 Scalar value @a["]"] better written as $a["]"] at - line 5.
181 Scalar value @a{"]"} better written as $a{"]"} at - line 6.
182 Scalar value @a["}"] better written as $a["}"] at - line 7.
183 Scalar value @a{"}"} better written as $a{"}"} at - line 8.
184 Scalar value @a{...} better written as $a{...} at - line 9.
185 Scalar value @a{...} better written as $a{...} at - line 10.
186 Scalar value @a[...] better written as $a[...] at - line 11.
187 Scalar value @a[...] better written as $a[...] at - line 12.
188 Scalar value @a[...] better written as $a[...] at - line 13.
189 Scalar value @a{...} better written as $a{...} at - line 14.
193 use open qw( :utf8 :std );
194 use warnings 'syntax' ;
197 no warnings 'syntax' ;
201 Scalar value @à[3] better written as $à[3] at - line 5.
202 Scalar value @à{3} better written as $à{3} at - line 6.
206 use open qw( :utf8 :std );
207 use warnings 'syntax' ;
210 no warnings 'syntax' ;
214 Scalar value @ぁ[3] better written as $ぁ[3] at - line 5.
215 Scalar value @ぁ{3} better written as $ぁ{3} at - line 6.
218 # "Scalar value better written as" false positives
219 # [perl #28380] and [perl #114024]
220 use warnings 'syntax';
223 @h{qw"a b c"} = 1..3;
224 @h{qw'a b c'} = 1..3;
225 @h{qw$a b c$} = 1..3;
226 @h{qw-a b c-} = 1..3;
227 @h{qw#a b c#} = 1..3;
228 @h{ qw#a b c#} = 1..3;
229 @h{ qw#a b c#} = 1..3; # tab before qw
233 sub foo() { qw/abc def ghi/ }
234 @X{+foo} = ( 1 .. 3 );
235 $_ = "abc"; @X{split ""} = ( 1 .. 3 );
236 my @s = @f{"}", "a"};
237 my @s = @f{"]", "a"};
245 use constant phoo => 1..3;
260 @h[qw"a b c"] = 1..3;
261 @h[qw'a b c'] = 1..3;
262 @h[qw$a b c$] = 1..3;
263 @h[qw-a b c-] = 1..3;
264 @h[qw#a b c#] = 1..3;
265 @h[ qw#a b c#] = 1..3;
266 @h[ qw#a b c#] = 1..3; # tab before qw
270 sub foo() { qw/abc def ghi/ }
271 @X[+foo] = ( 1 .. 3 );
272 $_ = "abc"; @X[split ""] = ( 1 .. 3 );
273 my @s = @f["}", "a"];
274 my @s = @f["]", "a"];
282 use constant phoo => 1..3;
298 # "Scalar value better written as" should not trigger for syntax errors
299 use warnings 'syntax';
302 syntax error at - line 4, near "[]"
303 Execution of - aborted due to compilation errors.
310 Can't use a hash as a reference at - line 3.
317 Can't use a hash as a reference at - line 3.
324 Can't use an array as a reference at - line 3.
331 Can't use an array as a reference at - line 3.
335 $main::foo = {}; %$main::foo->{"bar"};
338 Can't use a hash as a reference at - line 3.
342 $foo = {}; %$foo->{"bar"};
345 Can't use a hash as a reference at - line 3.
349 $main::foo = []; @$main::foo->[34];
352 Can't use an array as a reference at - line 3.
356 $foo = []; @$foo->[34];
359 Can't use an array as a reference at - line 3.
362 use warnings 'void' ; no warnings 'experimental::smartmatch'; close STDIN ;
364 1 x 3 ; # OP_REPEAT (folded)
365 (1) x 3 ; # OP_REPEAT
367 wantarray ; # OP_WANTARRAY
377 defined $a ; # OP_DEFINED
380 length $a ; # OP_LENGTH
381 substr $a,1 ; # OP_SUBSTR
382 vec $a,1,2 ; # OP_VEC
383 index $a,1,2 ; # OP_INDEX
384 rindex $a,1,2 ; # OP_RINDEX
385 sprintf $a ; # OP_SPRINTF
389 #values %a ; # OP_VALUES
393 unpack "a", "a" ; # OP_UNPACK
394 pack $a,"" ; # OP_PACK
395 join "", @_ ; # OP_JOIN
396 (@a)[0,1] ; # OP_LSLICE
399 sort(1,2) ; # OP_SORT
400 reverse(1,2) ; # OP_REVERSE
405 fileno STDIN ; # OP_FILENO
407 tell STDIN ; # OP_TELL
408 readlink 1; # OP_READLINK
410 localtime ; # OP_LOCALTIME
412 eval { getgrnam 1 }; # OP_GGRNAM
413 eval { getgrgid 1 }; # OP_GGRGID
414 eval { getpwnam 1 }; # OP_GPWNAM
415 eval { getpwuid 1 }; # OP_GPWUID
416 prototype "foo"; # OP_PROTOTYPE
417 $a ~~ $b; # OP_SMARTMATCH
425 grep /42/, (1,2); # OP_GREP. Not warned about (yet). Grep git logs for void_unusual to see why...
427 Useless use of a constant ("111") in void context at - line 2.
428 Useless use of repeat (x) in void context at - line 3.
429 Useless use of wantarray in void context at - line 5.
430 Useless use of reference-type operator in void context at - line 12.
431 Useless use of reference constructor in void context at - line 13.
432 Useless use of single ref constructor in void context at - line 14.
433 Useless use of defined operator in void context at - line 15.
434 Useless use of hex in void context at - line 16.
435 Useless use of oct in void context at - line 17.
436 Useless use of length in void context at - line 18.
437 Useless use of substr in void context at - line 19.
438 Useless use of vec in void context at - line 20.
439 Useless use of index in void context at - line 21.
440 Useless use of rindex in void context at - line 22.
441 Useless use of sprintf in void context at - line 23.
442 Useless use of array element in void context at - line 24.
443 Useless use of array slice in void context at - line 26.
444 Useless use of hash element in void context at - line 29.
445 Useless use of hash slice in void context at - line 30.
446 Useless use of unpack in void context at - line 31.
447 Useless use of pack in void context at - line 32.
448 Useless use of join or string in void context at - line 33.
449 Useless use of list slice in void context at - line 34.
450 Useless use of sort in void context at - line 37.
451 Useless use of reverse in void context at - line 38.
452 Useless use of range (or flop) in void context at - line 41.
453 Useless use of caller in void context at - line 42.
454 Useless use of fileno in void context at - line 43.
455 Useless use of eof in void context at - line 44.
456 Useless use of tell in void context at - line 45.
457 Useless use of readlink in void context at - line 46.
458 Useless use of time in void context at - line 47.
459 Useless use of localtime in void context at - line 48.
460 Useless use of gmtime in void context at - line 49.
461 Useless use of getgrnam in void context at - line 50.
462 Useless use of getgrgid in void context at - line 51.
463 Useless use of getpwnam in void context at - line 52.
464 Useless use of getpwuid in void context at - line 53.
465 Useless use of subroutine prototype in void context at - line 54.
466 Useless use of smart match in void context at - line 55.
467 Useless use of numeric comparison (<=>) in void context at - line 56.
468 Useless use of a constant ("dsatrewq") in void context at - line 57.
469 Useless use of a constant ("diatrewq") in void context at - line 58.
470 Useless use of a constant ("igatrewq") in void context at - line 59.
471 Useless use of __SUB__ in void context at - line 61.
472 Useless use of anonymous array ([]) in void context at - line 62.
475 use warnings 'void' ; close STDIN ;
476 my $x = sort (2,1,3);
480 Useless use of sort in scalar context at - line 3.
483 no warnings 'void' ; close STDIN ;
486 wantarray ; # OP_WANTARRAY
496 defined $a ; # OP_DEFINED
499 length $a ; # OP_LENGTH
500 substr $a,1 ; # OP_SUBSTR
501 vec $a,1,2 ; # OP_VEC
502 index $a,1,2 ; # OP_INDEX
503 rindex $a,1,2 ; # OP_RINDEX
504 sprintf $a ; # OP_SPRINTF
508 #values %a ; # OP_VALUES
512 unpack "a", "a" ; # OP_UNPACK
513 pack $a,"" ; # OP_PACK
515 (@a)[0,1] ; # OP_LSLICE
518 sort(1,2) ; # OP_SORT
519 reverse(1,2) ; # OP_REVERSE
524 fileno STDIN ; # OP_FILENO
526 tell STDIN ; # OP_TELL
527 readlink 1; # OP_READLINK
529 localtime ; # OP_LOCALTIME
531 eval { getgrnam 1 }; # OP_GGRNAM
532 eval { getgrgid 1 }; # OP_GGRGID
533 eval { getpwnam 1 }; # OP_GPWNAM
534 eval { getpwuid 1 }; # OP_GPWUID
535 prototype "foo"; # OP_PROTOTYPE
539 use warnings 'void' ;
540 for (@{[0]}) { "$_" } # check warning isn't duplicated
542 for (@{[0]}) { "$_" } # check warning isn't duplicated
544 Useless use of string in void context at - line 3.
547 use warnings 'void' ;
550 if ( ! $Config{d_telldir}) {
553 # telldir not present
558 telldir 1 ; # OP_TELLDIR
560 telldir 1 ; # OP_TELLDIR
562 Useless use of telldir in void context at - line 13.
565 use warnings 'void' ;
568 if ( ! $Config{d_getppid}) {
571 # getppid not present
576 getppid ; # OP_GETPPID
578 getppid ; # OP_GETPPID
580 Useless use of getppid in void context at - line 13.
583 use warnings 'void' ;
586 if ( ! $Config{d_getpgrp}) {
589 # getpgrp not present
594 getpgrp ; # OP_GETPGRP
596 getpgrp ; # OP_GETPGRP
598 Useless use of getpgrp in void context at - line 13.
601 use warnings 'void' ;
604 if ( ! $Config{d_times}) {
616 Useless use of times in void context at - line 13.
619 use warnings 'void' ;
622 if ( ! $Config{d_getprior} or $^O eq 'os2') { # Locks before fixpak22
625 # getpriority not present
630 getpriority 1,2; # OP_GETPRIORITY
632 getpriority 1,2; # OP_GETPRIORITY
634 Useless use of getpriority in void context at - line 13.
637 use warnings 'void' ;
640 if ( ! $Config{d_getlogin}) {
643 # getlogin not present
648 getlogin ; # OP_GETLOGIN
650 getlogin ; # OP_GETLOGIN
652 Useless use of getlogin in void context at - line 13.
655 use warnings 'void' ;
657 if ( ! $Config{d_socket}) {
660 # getsockname not present
661 # getpeername not present
662 # gethostbyname not present
663 # gethostbyaddr not present
664 # gethostent not present
665 # getnetbyname not present
666 # getnetbyaddr not present
667 # getnetent not present
668 # getprotobyname not present
669 # getprotobynumber not present
670 # getprotoent not present
671 # getservbyname not present
672 # getservbyport not present
673 # getservent not present
677 getsockname STDIN ; # OP_GETSOCKNAME
678 getpeername STDIN ; # OP_GETPEERNAME
679 gethostbyname 1 ; # OP_GHBYNAME
680 gethostbyaddr 1,2; # OP_GHBYADDR
681 gethostent ; # OP_GHOSTENT
682 getnetbyname 1 ; # OP_GNBYNAME
683 getnetbyaddr 1,2 ; # OP_GNBYADDR
684 getnetent ; # OP_GNETENT
685 getprotobyname 1; # OP_GPBYNAME
686 getprotobynumber 1; # OP_GPBYNUMBER
687 getprotoent ; # OP_GPROTOENT
688 getservbyname 1,2; # OP_GSBYNAME
689 getservbyport 1,2; # OP_GSBYPORT
690 getservent ; # OP_GSERVENT
693 getsockname STDIN ; # OP_GETSOCKNAME
694 getpeername STDIN ; # OP_GETPEERNAME
695 gethostbyname 1 ; # OP_GHBYNAME
696 gethostbyaddr 1,2; # OP_GHBYADDR
697 gethostent ; # OP_GHOSTENT
698 getnetbyname 1 ; # OP_GNBYNAME
699 getnetbyaddr 1,2 ; # OP_GNBYADDR
700 getnetent ; # OP_GNETENT
701 getprotobyname 1; # OP_GPBYNAME
702 getprotobynumber 1; # OP_GPBYNUMBER
703 getprotoent ; # OP_GPROTOENT
704 getservbyname 1,2; # OP_GSBYNAME
705 getservbyport 1,2; # OP_GSBYPORT
706 getservent ; # OP_GSERVENT
708 # some functions may not be there, so we exit without running
712 Useless use of getsockname in void context at - line 24.
713 Useless use of getpeername in void context at - line 25.
714 Useless use of gethostbyname in void context at - line 26.
715 Useless use of gethostbyaddr in void context at - line 27.
716 Useless use of gethostent in void context at - line 28.
717 Useless use of getnetbyname in void context at - line 29.
718 Useless use of getnetbyaddr in void context at - line 30.
719 Useless use of getnetent in void context at - line 31.
720 Useless use of getprotobyname in void context at - line 32.
721 Useless use of getprotobynumber in void context at - line 33.
722 Useless use of getprotoent in void context at - line 34.
723 Useless use of getservbyname in void context at - line 35.
724 Useless use of getservbyport in void context at - line 36.
725 Useless use of getservent in void context at - line 37.
728 use warnings 'void' ;
739 Useless use of a variable in void context at - line 3.
740 Useless use of a variable in void context at - line 4.
741 Useless use of a variable in void context at - line 5.
742 Useless use of a variable in void context at - line 6.
745 use warnings 'void' ;
748 "x" . "y"; # optimized to OP_CONST
749 2 + 2; # optimized to OP_CONST
750 use constant U => undef;
753 5 || print "bad\n"; # test OPpCONST_SHORTCIRCUIT
754 print "boo\n" if U; # test OPpCONST_SHORTCIRCUIT
755 if($foo){}elsif(""){} # test OPpCONST_SHORTCIRCUIT
759 "x" . "y"; # optimized to OP_CONST
760 2 + 2; # optimized to OP_CONST
762 Useless use of a constant ("abc") in void context at - line 3.
763 Useless use of a constant (7) in void context at - line 4.
764 Useless use of a constant ("xy") in void context at - line 5.
765 Useless use of a constant (4) in void context at - line 6.
766 Useless use of a constant (undef) in void context at - line 8.
767 Useless use of a constant ("\"\t\n") in void context at - line 9.
771 if (ord('A') == 193) {
772 print "SKIPPED\n# Result varies depending on EBCDIC code page";
777 use open qw( :utf8 :std );
778 use warnings 'void' ;
781 Useless use of a constant ("\340\x{1e06}c") in void context at - line 11.
785 use open qw( :utf8 :std );
786 use warnings 'void' ;
787 "Ẋ" . "ƴ"; # optimized to OP_CONST
788 FOO; # Bareword optimized to OP_CONST
789 use constant ů => undef;
791 5 || print "bad\n"; # test OPpCONST_SHORTCIRCUIT
792 print "boo\n" if ů; # test OPpCONST_SHORTCIRCUIT
795 "Ẋ" . "ƴ"; # optimized to OP_CONST
797 Useless use of a constant ("\x{1e8a}\x{1b4}") in void context at - line 5.
798 Useless use of a constant ("\x{ff26}\x{ff2f}\x{ff2f}") in void context at - line 6.
799 Useless use of a constant (undef) in void context at - line 8.
803 use warnings 'misc' ; use utf8;
804 my $a ; my @a = () ; my %a = () ; my $b = \@a ; my $c = \%a ;my $d = 'test';
824 my $a ; my @a = () ; my %a = () ; my $b = \@a ; my $c = \%a ; my $d = 'test';
842 Applying pattern match (m//) to @a will act on scalar(@a) at - line 5.
843 Applying substitution (s///) to @a2 will act on scalar(@a2) at - line 6.
844 Applying transliteration (tr///) to @a3 will act on scalar(@a3) at - line 7.
845 Applying pattern match (m//) to @array will act on scalar(@array) at - line 8.
846 Applying substitution (s///) to @array will act on scalar(@array) at - line 9.
847 Applying transliteration (tr///) to @array will act on scalar(@array) at - line 10.
848 Applying pattern match (m//) to %a will act on scalar(%a) at - line 11.
849 Applying substitution (s///) to %a2 will act on scalar(%a2) at - line 12.
850 Applying transliteration (tr///) to %a3 will act on scalar(%a3) at - line 13.
851 Applying pattern match (m//) to %hash will act on scalar(%hash) at - line 14.
852 Applying substitution (s///) to %hash will act on scalar(%hash) at - line 15.
853 Applying transliteration (tr///) to %hash will act on scalar(%hash) at - line 16.
854 Useless use of /d modifier in transliteration operator at - line 17.
855 Replacement list is longer than search list at - line 18.
856 Useless use of /d modifier in transliteration operator at - line 20.
857 Replacement list is longer than search list at - line 21.
858 Can't modify array dereference in substitution (s///) at - line 6, near "s/a/b/ ;"
859 BEGIN not safe after errors--compilation aborted at - line 23.
862 use warnings 'parenthesis' ;
864 my @foo,%bar, $quux; # there's a TAB here
867 no warnings 'parenthesis' ;
870 Parentheses missing around "my" list at - line 3.
871 Parentheses missing around "my" list at - line 4.
874 use warnings 'parenthesis' ;
877 no warnings 'parenthesis' ;
880 Parentheses missing around "our" list at - line 3.
883 use warnings 'parenthesis' ;
884 local $a, $b = (1,2);
887 no warnings 'parenthesis' ;
888 local $c, $d = (1,2);
890 Parentheses missing around "local" list at - line 3.
891 Parentheses missing around "local" list at - line 4.
892 Parentheses missing around "local" list at - line 5.
895 use warnings 'bareword' ;
897 no warnings 'bareword' ;
900 Bareword found in conditional at - line 3.
906 use warnings 'misc' ;
908 $x = 1 if $x = <FH> ;
912 $x = 1 if $x = <FH> ;
916 Value of <HANDLE> construct can be "0"; test with defined() at - line 4.
917 Value of <HANDLE> construct can be "0"; test with defined() at - line 5.
920 use warnings 'misc' ;
922 $x = 1 if $x = readdir FH ;
926 $x = 1 if $x = readdir FH ;
931 Value of readdir() operator can be "0"; test with defined() at - line 4.
932 Value of readdir() operator can be "0"; test with defined() at - line 5.
935 use warnings 'misc' ;
944 Value of glob construct can be "0"; test with defined() at - line 3.
945 Value of glob construct can be "0"; test with defined() at - line 4.
948 use warnings 'misc' ;
950 $x = 1 if $x = each %a ;
952 $x = 1 if $x = each %a ;
954 Value of each() operator can be "0"; test with defined() at - line 4.
957 use warnings 'misc' ;
958 $x = 1 while $x = <*> and 0 ;
960 $x = 1 while $x = <*> and 0 ;
962 Value of glob construct can be "0"; test with defined() at - line 3.
965 use warnings 'misc' ;
967 $x = 1 while $x = readdir FH and 0 ;
969 $x = 1 while $x = readdir FH and 0 ;
972 Value of readdir() operator can be "0"; test with defined() at - line 4.
977 ($_ = <FH>) // ($_ = 1);
983 use warnings 'redefine' ;
986 sub fred { # warning should be for this line
988 no warnings 'redefine' ;
993 Subroutine fred redefined at - line 4.
994 Subroutine fred redefined at - line 5.
997 use warnings 'redefine' ;
1000 no warnings 'redefine' ;
1003 Constant subroutine fred redefined at - line 4.
1009 Constant subroutine fred redefined at - line 3.
1013 *fred = sub () { 2 };
1015 Constant subroutine main::fred redefined at - line 3.
1018 use feature "lexical_subs", "state";
1019 my sub fred () { 1 }
1022 sub george () { 2 } # should *not* produce redef warnings by default
1023 state sub phred () { 1 }
1025 state sub jorge { 1 }
1026 sub jorge () { 2 } # should *not* produce redef warnings by default
1028 Prototype mismatch: sub fred () vs none at - line 4.
1029 Constant subroutine fred redefined at - line 4.
1030 Prototype mismatch: sub george: none vs () at - line 6.
1031 Prototype mismatch: sub phred () vs none at - line 8.
1032 Constant subroutine phred redefined at - line 8.
1033 Prototype mismatch: sub jorge: none vs () at - line 10.
1036 no warnings 'redefine' ;
1042 no warnings 'redefine' ;
1044 *fred = sub () { 2 };
1048 use warnings 'redefine' ;
1053 no warnings 'redefine' ;
1057 Format FRED redefined at - line 5.
1060 use warnings 'exec' ;
1064 Statement unlikely to be reached at - line 4.
1065 (Maybe you meant system() when you said exec()?)
1067 # op.c, no warning if exec isn't a statement.
1068 use warnings 'exec' ;
1069 $a || exec "$^X -e 1" ;
1077 Can't use 'defined(@array)' (Maybe you should just omit the defined()?) at - line 2.
1083 Can't use 'defined(@array)' (Maybe you should just omit the defined()?) at - line 2.
1086 defined(@a = (1,2,3));
1093 Can't use 'defined(%hash)' (Maybe you should just omit the defined()?) at - line 2.
1099 Can't use 'defined(%hash)' (Maybe you should just omit the defined()?) at - line 2.
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 BEGIN { $::{"foo"} = "\x{30cb}" }
1132 BEGIN { eval "sub foo {}"; }
1134 Prototype mismatch: sub main::foo (ニ) vs none at (eval 1) line 1.
1141 no warnings 'prototype' ;
1144 use warnings 'prototype' ;
1151 Prototype mismatch: sub main::fred () vs ($) at - line 4.
1152 Prototype mismatch: sub main::freD () vs ($) at - line 11.
1153 Prototype mismatch: sub main::FRED () vs ($) at - line 14.
1155 # op.c [S_simplify_sort]
1157 my @tests = split /^/, '
1158 sort {$a <=> $b} @a;
1159 sort {$a cmp $b} @a;
1160 { use integer; sort {$a <=> $b} @a}
1161 sort {$b <=> $a} @a;
1162 sort {$b cmp $a} @a;
1163 { use integer; sort {$b <=> $a} @a}
1165 for my $pragma ('use warnings "syntax";', '') {
1166 for my $vars ('', 'my $a;', 'my $b;', 'my ($a,$b);') {
1167 for my $inner_stmt ('', 'print;', 'func();') {
1168 eval "#line " . ++$line . "01 -\n$pragma\n$vars"
1169 . join "", map s/sort \{\K/$inner_stmt/r, @tests;
1175 use warnings 'syntax';
1177 # These used to be errors!
1178 sort { ; } $a <=> $b;
1179 sort { ; } $a, "<=>";
1180 sort { ; } $a, $cmp;
1181 sort $a, $b if $cmpany_name;
1185 "my $a" used in sort comparison at - line 403.
1186 "my $a" used in sort comparison at - line 404.
1187 "my $a" used in sort comparison at - line 405.
1188 "my $a" used in sort comparison at - line 406.
1189 "my $a" used in sort comparison at - line 407.
1190 "my $a" used in sort comparison at - line 408.
1191 "my $a" used in sort comparison at - line 503.
1192 "my $a" used in sort comparison at - line 504.
1193 "my $a" used in sort comparison at - line 505.
1194 "my $a" used in sort comparison at - line 506.
1195 "my $a" used in sort comparison at - line 507.
1196 "my $a" used in sort comparison at - line 508.
1197 "my $a" used in sort comparison at - line 603.
1198 "my $a" used in sort comparison at - line 604.
1199 "my $a" used in sort comparison at - line 605.
1200 "my $a" used in sort comparison at - line 606.
1201 "my $a" used in sort comparison at - line 607.
1202 "my $a" used in sort comparison at - line 608.
1203 "my $b" used in sort comparison at - line 703.
1204 "my $b" used in sort comparison at - line 704.
1205 "my $b" used in sort comparison at - line 705.
1206 "my $b" used in sort comparison at - line 706.
1207 "my $b" used in sort comparison at - line 707.
1208 "my $b" used in sort comparison at - line 708.
1209 "my $b" used in sort comparison at - line 803.
1210 "my $b" used in sort comparison at - line 804.
1211 "my $b" used in sort comparison at - line 805.
1212 "my $b" used in sort comparison at - line 806.
1213 "my $b" used in sort comparison at - line 807.
1214 "my $b" used in sort comparison at - line 808.
1215 "my $b" used in sort comparison at - line 903.
1216 "my $b" used in sort comparison at - line 904.
1217 "my $b" used in sort comparison at - line 905.
1218 "my $b" used in sort comparison at - line 906.
1219 "my $b" used in sort comparison at - line 907.
1220 "my $b" used in sort comparison at - line 908.
1221 "my $a" used in sort comparison at - line 1003.
1222 "my $b" used in sort comparison at - line 1003.
1223 "my $a" used in sort comparison at - line 1004.
1224 "my $b" used in sort comparison at - line 1004.
1225 "my $a" used in sort comparison at - line 1005.
1226 "my $b" used in sort comparison at - line 1005.
1227 "my $b" used in sort comparison at - line 1006.
1228 "my $a" used in sort comparison at - line 1006.
1229 "my $b" used in sort comparison at - line 1007.
1230 "my $a" used in sort comparison at - line 1007.
1231 "my $b" used in sort comparison at - line 1008.
1232 "my $a" used in sort comparison at - line 1008.
1233 "my $a" used in sort comparison at - line 1103.
1234 "my $b" used in sort comparison at - line 1103.
1235 "my $a" used in sort comparison at - line 1104.
1236 "my $b" used in sort comparison at - line 1104.
1237 "my $a" used in sort comparison at - line 1105.
1238 "my $b" used in sort comparison at - line 1105.
1239 "my $b" used in sort comparison at - line 1106.
1240 "my $a" used in sort comparison at - line 1106.
1241 "my $b" used in sort comparison at - line 1107.
1242 "my $a" used in sort comparison at - line 1107.
1243 "my $b" used in sort comparison at - line 1108.
1244 "my $a" used in sort comparison at - line 1108.
1245 "my $a" used in sort comparison at - line 1203.
1246 "my $b" used in sort comparison at - line 1203.
1247 "my $a" used in sort comparison at - line 1204.
1248 "my $b" used in sort comparison at - line 1204.
1249 "my $a" used in sort comparison at - line 1205.
1250 "my $b" used in sort comparison at - line 1205.
1251 "my $b" used in sort comparison at - line 1206.
1252 "my $a" used in sort comparison at - line 1206.
1253 "my $b" used in sort comparison at - line 1207.
1254 "my $a" used in sort comparison at - line 1207.
1255 "my $b" used in sort comparison at - line 1208.
1256 "my $a" used in sort comparison at - line 1208.
1258 # op.c [S_simplify_sort]
1259 use warnings 'syntax'; use 5.01;
1261 sort { $a <=> $b } ();
1263 "state $a" used in sort comparison at - line 4.
1265 # op.c [Perl_ck_cmp]
1266 use warnings 'syntax' ;
1267 no warnings 'deprecated';
1304 $[ used in numeric lt (<) (did you mean $] ?) at - line 4.
1305 $[ used in numeric gt (>) (did you mean $] ?) at - line 5.
1306 $[ used in numeric le (<=) (did you mean $] ?) at - line 6.
1307 $[ used in numeric ge (>=) (did you mean $] ?) at - line 7.
1308 $[ used in numeric lt (<) (did you mean $] ?) at - line 8.
1309 $[ used in numeric gt (>) (did you mean $] ?) at - line 9.
1310 $[ used in numeric le (<=) (did you mean $] ?) at - line 10.
1311 $[ used in numeric ge (>=) (did you mean $] ?) at - line 11.
1312 $[ used in numeric lt (<) (did you mean $] ?) at - line 13.
1313 $[ used in numeric gt (>) (did you mean $] ?) at - line 14.
1314 $[ used in numeric le (<=) (did you mean $] ?) at - line 15.
1315 $[ used in numeric ge (>=) (did you mean $] ?) at - line 16.
1316 $[ used in numeric lt (<) (did you mean $] ?) at - line 17.
1317 $[ used in numeric gt (>) (did you mean $] ?) at - line 18.
1318 $[ used in numeric le (<=) (did you mean $] ?) at - line 19.
1319 $[ used in numeric ge (>=) (did you mean $] ?) at - line 20.
1321 # op.c [Perl_ck_length]
1322 use warnings 'syntax' ;
1331 length() used on @a (did you mean "scalar(@a)"?) at - line 3.
1332 length() used on %b (did you mean "scalar(keys %b)"?) at - line 4.
1333 length() used on @array (did you mean "scalar(@array)"?) at - line 5.
1334 length() used on %hash (did you mean "scalar(keys %hash)"?) at - line 6.
1335 length() used on %h (did you mean "scalar(keys %h)"?) at - line 8.
1336 length() used on @g (did you mean "scalar(@g)"?) at - line 9.
1339 use warnings 'syntax' ;
1340 join /---/, 'x', 'y', 'z';
1342 /---/ should probably be written as "---" at - line 3.
1346 use open qw( :utf8 :std );
1347 use warnings 'syntax' ;
1348 join /~~~/, 'x', 'y', 'z';
1350 /~~~/ should probably be written as "~~~" at - line 5.
1353 use warnings 'prototype' ;
1356 no warnings 'prototype' ;
1360 main::fred() called too early to check prototype at - line 3.
1362 # op.c [Perl_newATTRSUB]
1364 use warnings 'void' ;
1365 BEGIN { $| = 1; print "in begin\n"; }
1366 CHECK { print "in check\n"; }
1367 INIT { print "in init\n"; }
1368 END { print "in end\n"; }
1369 print "in mainline\n";
1373 delete $INC{"abc.pm"};
1382 Too late to run CHECK block at abc.pm line 3.
1383 Too late to run INIT block at abc.pm line 4.
1386 Too late to run CHECK block at abc.pm line 3.
1387 Too late to run INIT block at abc.pm line 4.
1393 # op.c [Perl_newATTRSUB]
1395 no warnings 'void' ;
1396 BEGIN { $| = 1; print "in begin\n"; }
1397 CHECK { print "in check\n"; }
1398 INIT { print "in init\n"; }
1399 END { print "in end\n"; }
1400 print "in mainline\n";
1403 BEGIN { unshift @INC, '.' }
1416 use warnings 'syntax' ;
1419 no warnings 'syntax' ;
1423 Useless use of push with no values at - line 4.
1424 Useless use of unshift with no values at - line 5.
1427 # 20020401 mjd@plover.com at suggestion of jfriedl@yahoo.com
1428 use warnings 'regexp';
1429 split /blah/g, "blah";
1430 no warnings 'regexp';
1431 split /blah/g, "blah";
1433 Use of /g modifier is meaningless in split at - line 4.
1435 use feature "bitwise";
1450 use warnings "experimental::bitwise";
1465 no warnings "experimental::bitwise";
1481 The bitwise feature is experimental at - line 2.
1482 The bitwise feature is experimental at - line 3.
1483 The bitwise feature is experimental at - line 4.
1484 The bitwise feature is experimental at - line 5.
1485 The bitwise feature is experimental at - line 6.
1486 The bitwise feature is experimental at - line 7.
1487 The bitwise feature is experimental at - line 8.
1488 The bitwise feature is experimental at - line 9.
1489 The bitwise feature is experimental at - line 10.
1490 The bitwise feature is experimental at - line 11.
1491 The bitwise feature is experimental at - line 12.
1492 The bitwise feature is experimental at - line 13.
1493 The bitwise feature is experimental at - line 14.
1494 The bitwise feature is experimental at - line 15.
1495 The bitwise feature is experimental at - line 17.
1496 The bitwise feature is experimental at - line 18.
1497 The bitwise feature is experimental at - line 19.
1498 The bitwise feature is experimental at - line 20.
1499 The bitwise feature is experimental at - line 21.
1500 The bitwise feature is experimental at - line 22.
1501 The bitwise feature is experimental at - line 23.
1502 The bitwise feature is experimental at - line 24.
1503 The bitwise feature is experimental at - line 25.
1504 The bitwise feature is experimental at - line 26.
1505 The bitwise feature is experimental at - line 27.
1506 The bitwise feature is experimental at - line 28.
1507 The bitwise feature is experimental at - line 29.
1508 The bitwise feature is experimental at - line 30.
1511 use warnings 'precedence';
1518 $a = $b <=> $c & $d;
1519 $a &= $b == $c; $a |= $b == $c; $a ^= $b == $c; # shouldn't warn
1521 use experimental 'bitwise';
1528 $a = $b <=> $c & $d;
1529 $a &= $b == $c; $a |= $b == $c; $a ^= $b == $c; # shouldn't warn
1530 $a = $b &. $c == $d;
1531 $a = $b ^. $c != $d;
1534 $a = $b >= $c ^. $d;
1535 $a = $b <= $c |. $d;
1536 $a = $b <=> $c &. $d;
1537 $a &.= $b == $c; $a |.= $b == $c; $a ^.= $b == $c; # shouldn't warn
1539 no warnings 'precedence';
1546 $a = $b <=> $c & $d;
1548 use experimental 'bitwise';
1555 $a = $b <=> $c & $d;
1556 $a &= $b == $c; $a |= $b == $c; $a ^= $b == $c; # shouldn't warn
1557 $a = $b &. $c == $d;
1558 $a = $b ^. $c != $d;
1561 $a = $b >= $c ^. $d;
1562 $a = $b <= $c |. $d;
1563 $a = $b <=> $c &. $d;
1564 $a &.= $b == $c; $a |.= $b == $c; $a ^.= $b == $c; # shouldn't warn
1567 Possible precedence problem on bitwise & operator at - line 3.
1568 Possible precedence problem on bitwise ^ operator at - line 4.
1569 Possible precedence problem on bitwise | operator at - line 5.
1570 Possible precedence problem on bitwise & operator at - line 6.
1571 Possible precedence problem on bitwise ^ operator at - line 7.
1572 Possible precedence problem on bitwise | operator at - line 8.
1573 Possible precedence problem on bitwise & operator at - line 9.
1574 Possible precedence problem on bitwise & operator at - line 13.
1575 Possible precedence problem on bitwise ^ operator at - line 14.
1576 Possible precedence problem on bitwise | operator at - line 15.
1577 Possible precedence problem on bitwise & operator at - line 16.
1578 Possible precedence problem on bitwise ^ operator at - line 17.
1579 Possible precedence problem on bitwise | operator at - line 18.
1580 Possible precedence problem on bitwise & operator at - line 19.
1581 Possible precedence problem on bitwise &. operator at - line 21.
1582 Possible precedence problem on bitwise ^. operator at - line 22.
1583 Possible precedence problem on bitwise |. operator at - line 23.
1584 Possible precedence problem on bitwise &. operator at - line 24.
1585 Possible precedence problem on bitwise ^. operator at - line 25.
1586 Possible precedence problem on bitwise |. operator at - line 26.
1587 Possible precedence problem on bitwise &. operator at - line 27.
1591 use warnings 'precedence';
1598 $a = $b <=> $c & $d;
1599 no warnings 'precedence';
1606 $a = $b <=> $c & $d;
1608 Possible precedence problem on bitwise & operator at - line 4.
1609 Possible precedence problem on bitwise ^ operator at - line 5.
1610 Possible precedence problem on bitwise | operator at - line 6.
1611 Possible precedence problem on bitwise & operator at - line 7.
1612 Possible precedence problem on bitwise ^ operator at - line 8.
1613 Possible precedence problem on bitwise | operator at - line 9.
1614 Possible precedence problem on bitwise & operator at - line 10.
1618 # ok => local() has desired effect;
1619 # ignore=> local() silently ignored
1621 use warnings 'syntax';
1623 local(undef); # OP_UNDEF ignore
1624 sub lval : lvalue {};
1625 local(lval()); # OP_ENTERSUB
1626 local($x **= 1); # OP_POW
1627 local($x *= 1); # OP_MULTIPLY
1628 local($x /= 1); # OP_DIVIDE
1629 local($x %= 1); # OP_MODULO
1630 local($x x= 1); # OP_REPEAT
1631 local($x += 1); # OP_ADD
1632 local($x -= 1); # OP_SUBTRACT
1633 local($x .= 1); # OP_CONCAT
1634 local($x <<= 1); # OP_LEFT_SHIFT
1635 local($x >>= 1); # OP_RIGHT_SHIFT
1636 local($x &= 1); # OP_BIT_AND
1637 local($x ^= 1); # OP_BIT_XOR
1638 local($x |= 1); # OP_BIT_OR
1641 local($x *= 1); # OP_I_MULTIPLY
1642 local($x /= 1); # OP_I_DIVIDE
1643 local($x %= 1); # OP_I_MODULO
1644 local($x += 1); # OP_I_ADD
1645 local($x -= 1); # OP_I_SUBTRACT
1647 local($x?$y:$z) = 1; # OP_COND_EXPR ok
1648 # these two are fatal run-time errors instead
1649 #local(@$a); # OP_RV2AV ok
1650 #local(%$a); # OP_RV2HV ok
1651 local(*a); # OP_RV2GV ok
1652 local(@a[1,2]); # OP_ASLICE ok
1653 local(@a{1,2}); # OP_HSLICE ok
1654 local(@a = (1,2)); # OP_AASSIGN
1655 local($$x); # OP_RV2SV ok
1656 local($#a); # OP_AV2ARYLEN
1657 local($x = 1); # OP_SASSIGN
1658 local($x &&= 1); # OP_ANDASSIGN
1659 local($x ||= 1); # OP_ORASSIGN
1660 local($x //= 1); # OP_DORASSIGN
1661 local($a[0]); # OP_AELEMFAST ok
1663 local(substr($x,0,1)); # OP_SUBSTR
1664 local(pos($x)); # OP_POS
1665 local(vec($x,0,1)); # OP_VEC
1666 local($a[$b]); # OP_AELEM ok
1667 local($a{$b}); # OP_HELEM ok
1669 no warnings 'syntax';
1671 Useless localization of subroutine entry at - line 10.
1672 Useless localization of exponentiation (**) at - line 11.
1673 Useless localization of multiplication (*) at - line 12.
1674 Useless localization of division (/) at - line 13.
1675 Useless localization of modulus (%) at - line 14.
1676 Useless localization of repeat (x) at - line 15.
1677 Useless localization of addition (+) at - line 16.
1678 Useless localization of subtraction (-) at - line 17.
1679 Useless localization of concatenation (.) or string at - line 18.
1680 Useless localization of left bitshift (<<) at - line 19.
1681 Useless localization of right bitshift (>>) at - line 20.
1682 Useless localization of bitwise and (&) at - line 21.
1683 Useless localization of bitwise xor (^) at - line 22.
1684 Useless localization of bitwise or (|) at - line 23.
1685 Useless localization of integer multiplication (*) at - line 26.
1686 Useless localization of integer division (/) at - line 27.
1687 Useless localization of integer modulus (%) at - line 28.
1688 Useless localization of integer addition (+) at - line 29.
1689 Useless localization of integer subtraction (-) at - line 30.
1690 Useless localization of list assignment at - line 39.
1691 Useless localization of array length at - line 41.
1692 Useless localization of scalar assignment at - line 42.
1693 Useless localization of logical and assignment (&&=) at - line 43.
1694 Useless localization of logical or assignment (||=) at - line 44.
1695 Useless localization of defined or assignment (//=) at - line 45.
1696 Useless localization of substr at - line 48.
1697 Useless localization of match position at - line 49.
1698 Useless localization of vec at - line 50.
1705 my ($x5,@x6, %x7) if 0;
1708 # these shouldn't warn
1712 if (my $w2) { $a=1 }
1713 if ($a && (my $w3 = 1)) {$a = 2}
1716 Deprecated use of my() in false conditional. This will be a fatal error in Perl 5.30 at - line 2.
1717 Deprecated use of my() in false conditional. This will be a fatal error in Perl 5.30 at - line 3.
1718 Deprecated use of my() in false conditional. This will be a fatal error in Perl 5.30 at - line 4.
1719 Deprecated use of my() in false conditional. This will be a fatal error in Perl 5.30 at - line 5.
1720 Deprecated use of my() in false conditional. This will be a fatal error in Perl 5.30 at - line 6.
1721 Deprecated use of my() in false conditional. This will be a fatal error in Perl 5.30 at - line 7.
1722 Deprecated use of my() in false conditional. This will be a fatal error in Perl 5.30 at - line 8.
1727 use warnings 'deprecated';
1730 no warnings 'deprecated';
1734 Use of assignment to $[ is deprecated at - line 2.
1735 Use of assignment to $[ is deprecated at - line 3.
1736 Use of assignment to $[ is deprecated at - line 5.
1737 Use of assignment to $[ is deprecated at - line 6.
1740 use warnings 'void';
1741 @x = split /y/, "z";
1742 $x = split /y/, "z";
1745 @x = split /y/, "z";
1746 $x = split /y/, "z";
1749 Useless use of split in void context at - line 5.
1752 use warnings 'redefine' ;
1754 use open qw( :utf8 :std );
1757 no warnings 'redefine' ;
1760 Subroutine frèd redefined at - line 6.
1763 use warnings 'redefine' ;
1765 use open qw( :utf8 :std );
1768 no warnings 'redefine' ;
1771 Constant subroutine frèd redefined at - line 6.
1775 use open qw( :utf8 :std );
1779 Constant subroutine frèd redefined at - line 5.
1783 use open qw( :utf8 :std );
1785 *frèd = sub () { 2 };
1787 Constant subroutine main::frèd redefined at - line 5.
1790 use warnings 'redefine' ;
1792 use open qw( :utf8 :std );
1795 no warnings 'redefine' ;
1798 Subroutine ᚠርƊ redefined at - line 6.
1801 use warnings 'redefine' ;
1803 use open qw( :utf8 :std );
1806 no warnings 'redefine' ;
1809 Constant subroutine ᚠርƊ redefined at - line 6.
1813 use open qw( :utf8 :std );
1817 Constant subroutine ᚠርƊ redefined at - line 5.
1821 use open qw( :utf8 :std );
1823 *ᚠርƊ = sub () { 2 };
1825 Constant subroutine main::ᚠርƊ redefined at - line 5.
1828 sub DynaLoader::dl_error {};
1830 # We're testing that the warnings report the same line number:
1831 eval <<'EOC' or die $@;
1833 DynaLoader::boot_DynaLoader("DynaLoader");
1836 eval <<'EOC' or die $@;
1838 DynaLoader::boot_DynaLoader("DynaLoader");
1844 \ASubroutine DynaLoader::dl_error redefined at \(eval 1\) line 2\.
1846 Subroutine DynaLoader::dl_error redefined at \(eval 2\) line 2\.
1850 sub do_warn_1 { return $a or $b; }
1851 sub do_warn_2 { return $a and $b; }
1852 sub do_warn_3 { return $a xor $b; }
1853 sub do_warn_4 { die $a or $b; }
1854 sub do_warn_5 { die $a and $b; }
1855 sub do_warn_6 { die $a xor $b; }
1856 sub do_warn_7 { exit $a or $b; }
1857 sub do_warn_8 { exit $a and $b; }
1858 sub do_warn_9 { exit $a xor $b; }
1860 # Since exit is an unary operator, it is even stronger than
1862 sub do_warn_10 { exit $a || $b; }
1863 sub do_warn_11 { exit $a && $b; }
1865 sub do_warn_12 { goto $a or $b; }
1866 sub do_warn_13 { goto $a and $b; }
1867 sub do_warn_14 { goto $a xor $b; }
1868 sub do_warn_15 { next $a or $b while(1); }
1869 sub do_warn_16 { next $a and $b while(1); }
1870 sub do_warn_17 { next $a xor $b while(1); }
1871 sub do_warn_18 { last $a or $b while(1); }
1872 sub do_warn_19 { last $a and $b while(1); }
1873 sub do_warn_20 { last $a xor $b while(1); }
1874 sub do_warn_21 { redo $a or $b while(1); }
1875 sub do_warn_22 { redo $a and $b while(1); }
1876 sub do_warn_23 { redo $a xor $b while(1); }
1877 # These get re-written to "(return/die $a) and $b"
1878 sub do_warn_24 { $b if return $a; }
1879 sub do_warn_25 { $b if die $a; }
1881 Possible precedence issue with control flow operator at - line 3.
1882 Possible precedence issue with control flow operator at - line 4.
1883 Possible precedence issue with control flow operator at - line 5.
1884 Possible precedence issue with control flow operator at - line 6.
1885 Possible precedence issue with control flow operator at - line 7.
1886 Possible precedence issue with control flow operator at - line 8.
1887 Possible precedence issue with control flow operator at - line 9.
1888 Possible precedence issue with control flow operator at - line 10.
1889 Possible precedence issue with control flow operator at - line 11.
1890 Possible precedence issue with control flow operator at - line 15.
1891 Possible precedence issue with control flow operator at - line 16.
1892 Possible precedence issue with control flow operator at - line 18.
1893 Possible precedence issue with control flow operator at - line 19.
1894 Possible precedence issue with control flow operator at - line 20.
1895 Possible precedence issue with control flow operator at - line 21.
1896 Possible precedence issue with control flow operator at - line 22.
1897 Possible precedence issue with control flow operator at - line 23.
1898 Possible precedence issue with control flow operator at - line 24.
1899 Possible precedence issue with control flow operator at - line 25.
1900 Possible precedence issue with control flow operator at - line 26.
1901 Possible precedence issue with control flow operator at - line 27.
1902 Possible precedence issue with control flow operator at - line 28.
1903 Possible precedence issue with control flow operator at - line 29.
1904 Possible precedence issue with control flow operator at - line 31.
1905 Possible precedence issue with control flow operator at - line 32.
1908 # (same as above, except these should not warn)
1909 use constant FEATURE => 1;
1910 use constant MISSING_FEATURE => 0;
1912 sub dont_warn_1 { MISSING_FEATURE and return or dont_warn_3(); }
1913 sub dont_warn_2 { FEATURE || return and dont_warn_3(); }
1914 sub dont_warn_3 { not FEATURE and return or dont_warn_3(); }
1915 sub dont_warn_4 { !MISSING_FEATURE || return and dont_warn_3(); }
1916 sub dont_warn_5 { MISSING_FEATURE and die or dont_warn_3(); }
1917 sub dont_warn_6 { FEATURE || die and dont_warn_3(); }
1918 sub dont_warn_7 { not FEATURE and die or dont_warn_3(); }
1919 sub dont_warn_8 { !MISSING_FEATURE || die and dont_warn_3(); }
1920 sub dont_warn_9 { MISSING_FEATURE and goto $a or dont_warn_3(); }
1921 sub dont_warn_10 { FEATURE || goto $a and dont_warn_3(); }
1922 sub dont_warn_11 { not FEATURE and goto $a or dont_warn_3(); }
1923 sub dont_warn_12 { !MISSING_FEATURE || goto $a and dont_warn_3(); }
1925 sub dont_warn_13 { MISSING_FEATURE and exit $a or dont_warn_3(); }
1926 sub dont_warn_14 { FEATURE || exit $a and dont_warn_3(); }
1927 sub dont_warn_15 { not FEATURE and exit $a or dont_warn_3(); }
1928 sub dont_warn_16 { !MISSING_FEATURE || exit $a and dont_warn_3(); }
1930 sub dont_warn_17 { MISSING_FEATURE and next or dont_warn_3() while(1); }
1931 sub dont_warn_18 { FEATURE || next and dont_warn_3() while(1); }
1932 sub dont_warn_19 { not FEATURE and next or dont_warn_3() while(1); }
1933 sub dont_warn_20 { !MISSING_FEATURE || next and dont_warn_3() while(1); }
1934 sub dont_warn_21 { MISSING_FEATURE and redo or dont_warn_3() while(1); }
1935 sub dont_warn_22 { FEATURE || redo and dont_warn_3() while(1); }
1936 sub dont_warn_23 { not FEATURE and redo or dont_warn_3() while(1); }
1937 sub dont_warn_24 { !MISSING_FEATURE || redo and dont_warn_3() while(1); }
1938 sub dont_warn_25 { MISSING_FEATURE and last or dont_warn_3() while(1); }
1939 sub dont_warn_26 { FEATURE || last and dont_warn_3() while(1); }
1940 sub dont_warn_27 { not FEATURE and last or dont_warn_3() while(1); }
1941 sub dont_warn_28 { !MISSING_FEATURE || last and dont_warn_3() while(1); }
1943 # These are weird, but at least not ambiguous.
1944 sub dont_warn_29 { return ($a or $b); }
1945 sub dont_warn_30 { return ($a and $b); }
1946 sub dont_warn_31 { return ($a xor $b); }
1947 sub dont_warn_32 { die ($a or $b); }
1948 sub dont_warn_33 { die ($a and $b); }
1949 sub dont_warn_34 { die ($a xor $b); }
1950 sub dont_warn_35 { goto ($a or $b); }
1951 sub dont_warn_36 { goto ($a and $b); }
1952 sub dont_warn_37 { goto ($a xor $b); }
1953 sub dont_warn_38 { next ($a or $b) while(1); }
1954 sub dont_warn_39 { next ($a and $b) while(1); }
1955 sub dont_warn_40 { next ($a xor $b) while(1); }
1956 sub dont_warn_41 { last ($a or $b) while(1); }
1957 sub dont_warn_42 { last ($a and $b) while(1); }
1958 sub dont_warn_43 { last ($a xor $b) while(1); }
1959 sub dont_warn_44 { redo ($a or $b) while(1); }
1960 sub dont_warn_45 { redo ($a and $b) while(1); }
1961 sub dont_warn_46 { redo ($a xor $b) while(1); }
1964 use feature "signatures";
1968 $bbb = sub ($a) { 4 };
1970 The signatures feature is experimental at - line 3.
1971 The signatures feature is experimental at - line 5.
1973 no warnings "experimental::signatures";
1974 use feature "signatures";
1978 $bbb = sub ($a) { 4 };
1981 use warnings 'numeric';
1985 no warnings 'numeric';
1988 no warnings 'numeric';
1990 Negative repeat count does nothing at - line 3.
1991 Negative repeat count does nothing at - line 4.
1994 my $non_ieee_fp = ($Config{doublekind} == 9 ||
1995 $Config{doublekind} == 10 ||
1996 $Config{doublekind} == 11);
2000 # No inf/nan support
2007 use warnings 'numeric';
2011 no warnings 'numeric';
2015 no warnings 'numeric';
2017 Non-finite repeat count does nothing at - line 16.
2018 Non-finite repeat count does nothing at - line 17.
2019 Non-finite repeat count does nothing at - line 18.
2021 # NAME warn on stat @array
2022 @foo = ("op/stat.t");
2028 use warnings 'syntax';
2033 Array passed to stat will be coerced to a scalar (did you want stat $foo[0]?) at - line 8.
2034 Array passed to stat will be coerced to a scalar (did you want stat $bar[0]?) at - line 9.
2035 Array passed to stat will be coerced to a scalar at - line 10.
2038 # NAME barewords and conditionals near constant folding
2040 my $x1 = !a || !b; # no "in conditional" warnings
2041 my $x2 = !A || !B; # warning-free, because upper-case won't clash
2043 Unquoted string "a" may clash with future reserved word at - line 2.
2044 Unquoted string "b" may clash with future reserved word at - line 2.
2046 # RT #6870: Odd parsing of do...for...
2047 # This was really more a tokenizer bug, but it manifests as spurious warnings
2049 no warnings 'reserved';
2062 # TODO [perl #125493
2065 tr/0-9/\x{6F0}-\x{6F9}/;