3 "my" variable %s masks earlier declaration in same scope
7 Variable "%s" may be unavailable
15 Variable "%s" will not stay shared
23 Found = in conditional, should be ==
26 Use of implicit split to @_ is deprecated
29 Use of implicit split to @_ is deprecated
32 Useless use of time in void context
33 Useless use of a variable in void context
34 Useless use of a constant in void context
39 Useless use of sort in scalar context
42 Applying %s to %s will act on scalar(%s)
43 my $a ; my @a = () ; my %a = () ; my $b = \@a ; my $c = \%a ;
58 Parentheses missing around "my" list at -e line 1.
61 Parentheses missing around "local" list at -e line 1.
64 Bareword found in conditional at -e line 1.
65 use warnings 'bareword'; my $x = print(ABC || 1);
67 Value of %s may be \"0\"; use \"defined\"
69 $x = 1 while $x = <FH> ;
71 Subroutine fred redefined at -e line 1.
72 sub fred{1;} sub fred{1;}
74 Constant subroutine %s redefined
75 sub fred() {1;} sub fred() {1;}
77 Format FRED redefined at /tmp/x line 5.
83 Array @%s missing the @ in argument %d of %s()
86 Hash %%%s missing the %% in argument %d of %s()
89 Statement unlikely to be reached
90 (Maybe you meant system() when you said exec()?
93 defined(@array) is deprecated
94 (Maybe you should just omit the defined()?)
96 defined (@a = (1,2,3)) ;
98 defined(%hash) is deprecated
99 (Maybe you should just omit the defined()?)
102 /---/ should probably be written as "---"
105 %s() called too early to check prototype [Perl_peep]
106 fred() ; sub fred ($$) {}
109 Use of "package" with no arguments is deprecated
112 Package `%s' not found (did you use the incorrect case?)
114 Use of /g modifier is meaningless in split
118 Prototype mismatch: [cv_ckproto]
122 %s never introduced [pad_leavemy] TODO
123 Runaway prototype [newSUB] TODO
124 oops: oopsAV [oopsAV] TODO
125 oops: oopsHV [oopsHV] TODO
130 use warnings 'misc' ;
136 "my" variable $x masks earlier declaration in same scope at - line 4.
139 use warnings 'closure' ;
147 Variable "$x" will not stay shared at - line 7.
150 no warnings 'closure' ;
161 use warnings 'closure' ;
172 use warnings 'closure' ;
180 Variable "$x" may be unavailable at - line 6.
183 no warnings 'closure' ;
194 use warnings 'syntax' ;
196 no warnings 'syntax' ;
199 Found = in conditional, should be == at - line 3.
202 use warnings 'deprecated' ;
204 no warnings 'deprecated' ;
207 Use of implicit split to @_ is deprecated at - line 3.
210 use warnings 'deprecated' ;
212 no warnings 'deprecated' ;
215 Use of implicit split to @_ is deprecated at - line 3.
218 use warnings 'deprecated';
224 $main::foo = {}; %$main::foo->{"bar"};
225 $foo = {}; %$foo->{"bar"};
226 $main::foo = []; @$main::foo->[34];
227 $foo = []; @$foo->[34];
228 no warnings 'deprecated';
233 $main::foo = {}; %$main::foo->{"bar"};
234 $foo = {}; %$foo->{"bar"};
235 $main::foo = []; @$main::foo->[34];
236 $foo = []; @$foo->[34];
238 Using a hash as a reference is deprecated at - line 4.
239 Using a hash as a reference is deprecated at - line 5.
240 Using an array as a reference is deprecated at - line 6.
241 Using an array as a reference is deprecated at - line 7.
242 Using a hash as a reference is deprecated at - line 8.
243 Using a hash as a reference is deprecated at - line 9.
244 Using an array as a reference is deprecated at - line 10.
245 Using an array as a reference is deprecated at - line 11.
248 use warnings 'void' ; close STDIN ;
251 wantarray ; # OP_WANTARRAY
261 defined $a ; # OP_DEFINED
264 length $a ; # OP_LENGTH
265 substr $a,1 ; # OP_SUBSTR
266 vec $a,1,2 ; # OP_VEC
267 index $a,1,2 ; # OP_INDEX
268 rindex $a,1,2 ; # OP_RINDEX
269 sprintf $a ; # OP_SPRINTF
273 #values %a ; # OP_VALUES
277 unpack "a", "a" ; # OP_UNPACK
278 pack $a,"" ; # OP_PACK
280 (@a)[0,1] ; # OP_LSLICE
283 sort(1,2) ; # OP_SORT
284 reverse(1,2) ; # OP_REVERSE
289 fileno STDIN ; # OP_FILENO
291 tell STDIN ; # OP_TELL
292 readlink 1; # OP_READLINK
294 localtime ; # OP_LOCALTIME
296 eval { getgrnam 1 }; # OP_GGRNAM
297 eval { getgrgid 1 }; # OP_GGRGID
298 eval { getpwnam 1 }; # OP_GPWNAM
299 eval { getpwuid 1 }; # OP_GPWUID
301 Useless use of repeat (x) in void context at - line 3.
302 Useless use of wantarray in void context at - line 5.
303 Useless use of reference-type operator in void context at - line 12.
304 Useless use of reference constructor in void context at - line 13.
305 Useless use of single ref constructor in void context at - line 14.
306 Useless use of defined operator in void context at - line 15.
307 Useless use of hex in void context at - line 16.
308 Useless use of oct in void context at - line 17.
309 Useless use of length in void context at - line 18.
310 Useless use of substr in void context at - line 19.
311 Useless use of vec in void context at - line 20.
312 Useless use of index in void context at - line 21.
313 Useless use of rindex in void context at - line 22.
314 Useless use of sprintf in void context at - line 23.
315 Useless use of array element in void context at - line 24.
316 Useless use of array slice in void context at - line 26.
317 Useless use of hash element in void context at - line 29.
318 Useless use of hash slice in void context at - line 30.
319 Useless use of unpack in void context at - line 31.
320 Useless use of pack in void context at - line 32.
321 Useless use of join or string in void context at - line 33.
322 Useless use of list slice in void context at - line 34.
323 Useless use of sort in void context at - line 37.
324 Useless use of reverse in void context at - line 38.
325 Useless use of range (or flop) in void context at - line 41.
326 Useless use of caller in void context at - line 42.
327 Useless use of fileno in void context at - line 43.
328 Useless use of eof in void context at - line 44.
329 Useless use of tell in void context at - line 45.
330 Useless use of readlink in void context at - line 46.
331 Useless use of time in void context at - line 47.
332 Useless use of localtime in void context at - line 48.
333 Useless use of gmtime in void context at - line 49.
334 Useless use of getgrnam in void context at - line 50.
335 Useless use of getgrgid in void context at - line 51.
336 Useless use of getpwnam in void context at - line 52.
337 Useless use of getpwuid in void context at - line 53.
340 use warnings 'void' ; close STDIN ;
341 my $x = sort (2,1,3);
345 Useless use of sort in scalar context at - line 3.
348 no warnings 'void' ; close STDIN ;
351 wantarray ; # OP_WANTARRAY
361 defined $a ; # OP_DEFINED
364 length $a ; # OP_LENGTH
365 substr $a,1 ; # OP_SUBSTR
366 vec $a,1,2 ; # OP_VEC
367 index $a,1,2 ; # OP_INDEX
368 rindex $a,1,2 ; # OP_RINDEX
369 sprintf $a ; # OP_SPRINTF
373 #values %a ; # OP_VALUES
377 unpack "a", "a" ; # OP_UNPACK
378 pack $a,"" ; # OP_PACK
380 (@a)[0,1] ; # OP_LSLICE
383 sort(1,2) ; # OP_SORT
384 reverse(1,2) ; # OP_REVERSE
389 fileno STDIN ; # OP_FILENO
391 tell STDIN ; # OP_TELL
392 readlink 1; # OP_READLINK
394 localtime ; # OP_LOCALTIME
396 eval { getgrnam 1 }; # OP_GGRNAM
397 eval { getgrgid 1 }; # OP_GGRGID
398 eval { getpwnam 1 }; # OP_GPWNAM
399 eval { getpwuid 1 }; # OP_GPWUID
403 use warnings 'void' ;
404 for (@{[0]}) { "$_" } # check warning isn't duplicated
406 for (@{[0]}) { "$_" } # check warning isn't duplicated
408 Useless use of string in void context at - line 3.
411 use warnings 'void' ;
414 if ( ! $Config{d_telldir}) {
417 # telldir not present
422 telldir 1 ; # OP_TELLDIR
424 telldir 1 ; # OP_TELLDIR
426 Useless use of telldir in void context at - line 13.
429 use warnings 'void' ;
432 if ( ! $Config{d_getppid}) {
435 # getppid not present
440 getppid ; # OP_GETPPID
442 getppid ; # OP_GETPPID
444 Useless use of getppid in void context at - line 13.
447 use warnings 'void' ;
450 if ( ! $Config{d_getpgrp}) {
453 # getpgrp not present
458 getpgrp ; # OP_GETPGRP
460 getpgrp ; # OP_GETPGRP
462 Useless use of getpgrp in void context at - line 13.
465 use warnings 'void' ;
468 if ( ! $Config{d_times}) {
480 Useless use of times in void context at - line 13.
483 use warnings 'void' ;
486 if ( ! $Config{d_getprior} or $^O eq 'os2') { # Locks before fixpak22
489 # getpriority not present
494 getpriority 1,2; # OP_GETPRIORITY
496 getpriority 1,2; # OP_GETPRIORITY
498 Useless use of getpriority in void context at - line 13.
501 use warnings 'void' ;
504 if ( ! $Config{d_getlogin}) {
507 # getlogin not present
512 getlogin ; # OP_GETLOGIN
514 getlogin ; # OP_GETLOGIN
516 Useless use of getlogin in void context at - line 13.
519 use warnings 'void' ;
521 if ( ! $Config{d_socket}) {
524 # getsockname not present
525 # getpeername not present
526 # gethostbyname not present
527 # gethostbyaddr not present
528 # gethostent not present
529 # getnetbyname not present
530 # getnetbyaddr not present
531 # getnetent not present
532 # getprotobyname not present
533 # getprotobynumber not present
534 # getprotoent not present
535 # getservbyname not present
536 # getservbyport not present
537 # getservent not present
541 getsockname STDIN ; # OP_GETSOCKNAME
542 getpeername STDIN ; # OP_GETPEERNAME
543 gethostbyname 1 ; # OP_GHBYNAME
544 gethostbyaddr 1,2; # OP_GHBYADDR
545 gethostent ; # OP_GHOSTENT
546 getnetbyname 1 ; # OP_GNBYNAME
547 getnetbyaddr 1,2 ; # OP_GNBYADDR
548 getnetent ; # OP_GNETENT
549 getprotobyname 1; # OP_GPBYNAME
550 getprotobynumber 1; # OP_GPBYNUMBER
551 getprotoent ; # OP_GPROTOENT
552 getservbyname 1,2; # OP_GSBYNAME
553 getservbyport 1,2; # OP_GSBYPORT
554 getservent ; # OP_GSERVENT
557 getsockname STDIN ; # OP_GETSOCKNAME
558 getpeername STDIN ; # OP_GETPEERNAME
559 gethostbyname 1 ; # OP_GHBYNAME
560 gethostbyaddr 1,2; # OP_GHBYADDR
561 gethostent ; # OP_GHOSTENT
562 getnetbyname 1 ; # OP_GNBYNAME
563 getnetbyaddr 1,2 ; # OP_GNBYADDR
564 getnetent ; # OP_GNETENT
565 getprotobyname 1; # OP_GPBYNAME
566 getprotobynumber 1; # OP_GPBYNUMBER
567 getprotoent ; # OP_GPROTOENT
568 getservbyname 1,2; # OP_GSBYNAME
569 getservbyport 1,2; # OP_GSBYPORT
570 getservent ; # OP_GSERVENT
572 # some functions may not be there, so we exit without running
576 Useless use of getsockname in void context at - line 24.
577 Useless use of getpeername in void context at - line 25.
578 Useless use of gethostbyname in void context at - line 26.
579 Useless use of gethostbyaddr in void context at - line 27.
580 Useless use of gethostent in void context at - line 28.
581 Useless use of getnetbyname in void context at - line 29.
582 Useless use of getnetbyaddr in void context at - line 30.
583 Useless use of getnetent in void context at - line 31.
584 Useless use of getprotobyname in void context at - line 32.
585 Useless use of getprotobynumber in void context at - line 33.
586 Useless use of getprotoent in void context at - line 34.
587 Useless use of getservbyname in void context at - line 35.
588 Useless use of getservbyport in void context at - line 36.
589 Useless use of getservent in void context at - line 37.
592 use warnings 'void' ;
603 Useless use of a variable in void context at - line 3.
604 Useless use of a variable in void context at - line 4.
605 Useless use of a variable in void context at - line 5.
606 Useless use of a variable in void context at - line 6.
609 use warnings 'void' ;
616 Useless use of a constant in void context at - line 3.
617 Useless use of a constant in void context at - line 4.
621 use warnings 'misc' ;
622 my $a ; my @a = () ; my %a = () ; my $b = \@a ; my $c = \%a ;
637 my $a ; my @a = () ; my %a = () ; my $b = \@a ; my $c = \%a ;
652 Applying pattern match (m//) to @array will act on scalar(@array) at - line 5.
653 Applying substitution (s///) to @array will act on scalar(@array) at - line 6.
654 Applying transliteration (tr///) to @array will act on scalar(@array) at - line 7.
655 Applying pattern match (m//) to @array will act on scalar(@array) at - line 8.
656 Applying substitution (s///) to @array will act on scalar(@array) at - line 9.
657 Applying transliteration (tr///) to @array will act on scalar(@array) at - line 10.
658 Applying pattern match (m//) to %hash will act on scalar(%hash) at - line 11.
659 Applying substitution (s///) to %hash will act on scalar(%hash) at - line 12.
660 Applying transliteration (tr///) to %hash will act on scalar(%hash) at - line 13.
661 Applying pattern match (m//) to %hash will act on scalar(%hash) at - line 14.
662 Applying substitution (s///) to %hash will act on scalar(%hash) at - line 15.
663 Applying transliteration (tr///) to %hash will act on scalar(%hash) at - line 16.
664 Can't modify private array in substitution (s///) at - line 6, near "s/a/b/ ;"
665 BEGIN not safe after errors--compilation aborted at - line 18.
668 use warnings 'syntax' ;
670 no warnings 'syntax' ;
673 Parentheses missing around "my" list at - line 3.
676 use warnings 'syntax' ;
677 local $a, $b = (1,2);
678 no warnings 'syntax' ;
679 local $c, $d = (1,2);
681 Parentheses missing around "local" list at - line 3.
684 use warnings 'bareword' ;
686 no warnings 'bareword' ;
689 Bareword found in conditional at - line 3.
695 use warnings 'misc' ;
697 $x = 1 if $x = <FH> ;
699 $x = 1 if $x = <FH> ;
701 Value of <HANDLE> construct can be "0"; test with defined() at - line 4.
704 use warnings 'misc' ;
706 $x = 1 if $x = readdir FH ;
708 $x = 1 if $x = readdir FH ;
711 Value of readdir() operator can be "0"; test with defined() at - line 4.
714 use warnings 'misc' ;
719 Value of glob construct can be "0"; test with defined() at - line 3.
722 use warnings 'misc' ;
724 $x = 1 if $x = each %a ;
726 $x = 1 if $x = each %a ;
728 Value of each() operator can be "0"; test with defined() at - line 4.
731 use warnings 'misc' ;
732 $x = 1 while $x = <*> and 0 ;
734 $x = 1 while $x = <*> and 0 ;
736 Value of glob construct can be "0"; test with defined() at - line 3.
739 use warnings 'misc' ;
741 $x = 1 while $x = readdir FH and 0 ;
743 $x = 1 while $x = readdir FH and 0 ;
746 Value of readdir() operator can be "0"; test with defined() at - line 4.
749 use warnings 'redefine' ;
752 no warnings 'redefine' ;
755 Subroutine fred redefined at - line 4.
758 use warnings 'redefine' ;
761 no warnings 'redefine' ;
764 Constant subroutine fred redefined at - line 4.
767 no warnings 'redefine' ;
771 Constant subroutine fred redefined at - line 4.
774 no warnings 'redefine' ;
776 *fred = sub () { 2 };
778 Constant subroutine main::fred redefined at - line 4.
781 use warnings 'redefine' ;
786 no warnings 'redefine' ;
790 Format FRED redefined at - line 5.
793 use warnings 'deprecated' ;
795 no warnings 'deprecated' ;
798 Array @FRED missing the @ in argument 1 of push() at - line 3.
801 use warnings 'deprecated' ;
803 no warnings 'deprecated' ;
806 Hash %FRED missing the % in argument 1 of keys() at - line 3.
809 use warnings 'syntax' ;
813 Statement unlikely to be reached at - line 4.
814 (Maybe you meant system() when you said exec()?)
817 use warnings 'deprecated' ;
820 defined(@array) is deprecated at - line 3.
821 (Maybe you should just omit the defined()?)
824 use warnings 'deprecated' ;
825 defined(@a = (1,2,3));
827 defined(@array) is deprecated at - line 3.
828 (Maybe you should just omit the defined()?)
831 use warnings 'deprecated' ;
834 defined(%hash) is deprecated at - line 3.
835 (Maybe you should just omit the defined()?)
838 no warnings 'syntax' ;
848 Prototype mismatch: sub main::fred () vs ($) at - line 3.
855 no warnings 'prototype' ;
858 use warnings 'prototype' ;
865 Prototype mismatch: sub main::fred () vs ($) at - line 4.
866 Prototype mismatch: sub main::freD () vs ($) at - line 11.
867 Prototype mismatch: sub main::FRED () vs ($) at - line 14.
870 use warnings 'syntax' ;
871 join /---/, 'x', 'y', 'z';
873 /---/ should probably be written as "---" at - line 3.
876 use warnings 'prototype' ;
879 no warnings 'prototype' ;
883 main::fred() called too early to check prototype at - line 3.
885 # op.c [Perl_newATTRSUB]
887 use warnings 'void' ;
888 BEGIN { $| = 1; print "in begin\n"; }
889 CHECK { print "in check\n"; }
890 INIT { print "in init\n"; }
891 END { print "in end\n"; }
892 print "in mainline\n";
896 delete $INC{"abc.pm"};
905 Too late to run CHECK block at abc.pm line 3.
906 Too late to run INIT block at abc.pm line 4.
909 Too late to run CHECK block at abc.pm line 3.
910 Too late to run INIT block at abc.pm line 4.
916 # op.c [Perl_newATTRSUB]
919 BEGIN { $| = 1; print "in begin\n"; }
920 CHECK { print "in check\n"; }
921 INIT { print "in init\n"; }
922 END { print "in end\n"; }
923 print "in mainline\n";
938 use warnings 'syntax' ;
941 no warnings 'syntax' ;
945 Useless use of push with no values at - line 4.
946 Useless use of unshift with no values at - line 5.
949 use warnings 'deprecated' ;
951 no warnings 'deprecated' ;
954 Use of "package" with no arguments is deprecated at - line 3.
955 Global symbol "BEGIN" requires explicit package name at - line 4.
956 BEGIN not safe after errors--compilation aborted at - line 4.
959 # 20020401 mjd@plover.com at suggestion of jfriedl@yahoo.com
960 use warnings 'regexp';
961 split /blah/g, "blah";
962 no warnings 'regexp';
963 split /blah/g, "blah";
965 Use of /g modifier is meaningless in split at - line 4.