Commit | Line | Data |
599cee73 |
1 | op.c AOK |
2 | |
599cee73 |
3 | Found = in conditional, should be == |
4 | 1 if $a = 1 ; |
5 | |
599cee73 |
6 | Useless use of time in void context |
7 | Useless use of a variable in void context |
8 | Useless use of a constant in void context |
9 | time ; |
10 | $a ; |
11 | "abc" |
12 | |
a801c63c |
13 | Useless use of sort in scalar context |
14 | my $x = sort (2,1,3); |
15 | |
599cee73 |
16 | Applying %s to %s will act on scalar(%s) |
17 | my $a ; my @a = () ; my %a = () ; my $b = \@a ; my $c = \%a ; |
18 | @a =~ /abc/ ; |
19 | @a =~ s/a/b/ ; |
20 | @a =~ tr/a/b/ ; |
21 | @$b =~ /abc/ ; |
22 | @$b =~ s/a/b/ ; |
23 | @$b =~ tr/a/b/ ; |
24 | %a =~ /abc/ ; |
25 | %a =~ s/a/b/ ; |
26 | %a =~ tr/a/b/ ; |
27 | %$c =~ /abc/ ; |
28 | %$c =~ s/a/b/ ; |
29 | %$c =~ tr/a/b/ ; |
30 | |
31 | |
df5b6949 |
32 | Parentheses missing around "my" list at -e line 1. |
599cee73 |
33 | my $a, $b = (1,2); |
34 | |
df5b6949 |
35 | Parentheses missing around "local" list at -e line 1. |
599cee73 |
36 | local $a, $b = (1,2); |
37 | |
34d09196 |
38 | Bareword found in conditional at -e line 1. |
e476b1b5 |
39 | use warnings 'bareword'; my $x = print(ABC || 1); |
599cee73 |
40 | |
41 | Value of %s may be \"0\"; use \"defined\" |
42 | $x = 1 if $x = <FH> ; |
43 | $x = 1 while $x = <FH> ; |
44 | |
45 | Subroutine fred redefined at -e line 1. |
46 | sub fred{1;} sub fred{1;} |
47 | |
48 | Constant subroutine %s redefined |
49 | sub fred() {1;} sub fred() {1;} |
50 | |
51 | Format FRED redefined at /tmp/x line 5. |
52 | format FRED = |
53 | . |
54 | format FRED = |
55 | . |
56 | |
57 | Array @%s missing the @ in argument %d of %s() |
58 | push fred ; |
59 | |
60 | Hash %%%s missing the %% in argument %d of %s() |
61 | keys joe ; |
62 | |
63 | Statement unlikely to be reached |
cc507455 |
64 | (Maybe you meant system() when you said exec()? |
599cee73 |
65 | exec "true" ; my $a |
66 | |
f10b0346 |
67 | defined(@array) is deprecated |
cc507455 |
68 | (Maybe you should just omit the defined()?) |
69794302 |
69 | my @a ; defined @a ; |
70 | defined (@a = (1,2,3)) ; |
71 | |
f10b0346 |
72 | defined(%hash) is deprecated |
cc507455 |
73 | (Maybe you should just omit the defined()?) |
69794302 |
74 | my %h ; defined %h ; |
eb6e2d6f |
75 | |
76 | /---/ should probably be written as "---" |
77 | join(/---/, @foo); |
599cee73 |
78 | |
767a6a26 |
79 | %s() called too early to check prototype [Perl_peep] |
80 | fred() ; sub fred ($$) {} |
81 | |
82 | |
3b434eb1 |
83 | Package `%s' not found (did you use the incorrect case?) |
84 | |
f34840d8 |
85 | Use of /g modifier is meaningless in split |
86 | |
276b2a0c |
87 | Possible precedence problem on bitwise %c operator [Perl_ck_bitop] |
88 | |
0453d815 |
89 | Mandatory Warnings |
90 | ------------------ |
91 | Prototype mismatch: [cv_ckproto] |
92 | sub fred() ; |
93 | sub fred($) {} |
94 | |
0453d815 |
95 | Runaway prototype [newSUB] TODO |
96 | oops: oopsAV [oopsAV] TODO |
97 | oops: oopsHV [oopsHV] TODO |
98 | |
599cee73 |
99 | __END__ |
100 | # op.c |
4438c4b7 |
101 | use warnings 'syntax' ; |
599cee73 |
102 | 1 if $a = 1 ; |
4438c4b7 |
103 | no warnings 'syntax' ; |
0453d815 |
104 | 1 if $a = 1 ; |
599cee73 |
105 | EXPECT |
106 | Found = in conditional, should be == at - line 3. |
107 | ######## |
108 | # op.c |
a1063b2d |
109 | my (@foo, %foo); |
110 | %main::foo->{"bar"}; |
111 | %foo->{"bar"}; |
112 | @main::foo->[23]; |
113 | @foo->[23]; |
114 | $main::foo = {}; %$main::foo->{"bar"}; |
115 | $foo = {}; %$foo->{"bar"}; |
116 | $main::foo = []; @$main::foo->[34]; |
117 | $foo = []; @$foo->[34]; |
118 | no warnings 'deprecated'; |
119 | %main::foo->{"bar"}; |
120 | %foo->{"bar"}; |
121 | @main::foo->[23]; |
122 | @foo->[23]; |
123 | $main::foo = {}; %$main::foo->{"bar"}; |
124 | $foo = {}; %$foo->{"bar"}; |
125 | $main::foo = []; @$main::foo->[34]; |
126 | $foo = []; @$foo->[34]; |
127 | EXPECT |
d1d15184 |
128 | Using a hash as a reference is deprecated at - line 3. |
a1063b2d |
129 | Using a hash as a reference is deprecated at - line 4. |
d1d15184 |
130 | Using an array as a reference is deprecated at - line 5. |
a1063b2d |
131 | Using an array as a reference is deprecated at - line 6. |
d1d15184 |
132 | Using a hash as a reference is deprecated at - line 7. |
a1063b2d |
133 | Using a hash as a reference is deprecated at - line 8. |
d1d15184 |
134 | Using an array as a reference is deprecated at - line 9. |
a1063b2d |
135 | Using an array as a reference is deprecated at - line 10. |
a1063b2d |
136 | ######## |
137 | # op.c |
4438c4b7 |
138 | use warnings 'void' ; close STDIN ; |
599cee73 |
139 | 1 x 3 ; # OP_REPEAT |
140 | # OP_GVSV |
141 | wantarray ; # OP_WANTARRAY |
142 | # OP_GV |
143 | # OP_PADSV |
144 | # OP_PADAV |
145 | # OP_PADHV |
146 | # OP_PADANY |
147 | # OP_AV2ARYLEN |
148 | ref ; # OP_REF |
149 | \@a ; # OP_REFGEN |
150 | \$a ; # OP_SREFGEN |
151 | defined $a ; # OP_DEFINED |
152 | hex $a ; # OP_HEX |
153 | oct $a ; # OP_OCT |
154 | length $a ; # OP_LENGTH |
155 | substr $a,1 ; # OP_SUBSTR |
156 | vec $a,1,2 ; # OP_VEC |
157 | index $a,1,2 ; # OP_INDEX |
158 | rindex $a,1,2 ; # OP_RINDEX |
159 | sprintf $a ; # OP_SPRINTF |
160 | $a[0] ; # OP_AELEM |
161 | # OP_AELEMFAST |
162 | @a[0] ; # OP_ASLICE |
163 | #values %a ; # OP_VALUES |
164 | #keys %a ; # OP_KEYS |
165 | $a{0} ; # OP_HELEM |
166 | @a{0} ; # OP_HSLICE |
167 | unpack "a", "a" ; # OP_UNPACK |
168 | pack $a,"" ; # OP_PACK |
169 | join "" ; # OP_JOIN |
170 | (@a)[0,1] ; # OP_LSLICE |
171 | # OP_ANONLIST |
172 | # OP_ANONHASH |
173 | sort(1,2) ; # OP_SORT |
174 | reverse(1,2) ; # OP_REVERSE |
175 | # OP_RANGE |
176 | # OP_FLIP |
177 | (1 ..2) ; # OP_FLOP |
178 | caller ; # OP_CALLER |
179 | fileno STDIN ; # OP_FILENO |
180 | eof STDIN ; # OP_EOF |
181 | tell STDIN ; # OP_TELL |
182 | readlink 1; # OP_READLINK |
183 | time ; # OP_TIME |
184 | localtime ; # OP_LOCALTIME |
185 | gmtime ; # OP_GMTIME |
dfe13c55 |
186 | eval { getgrnam 1 }; # OP_GGRNAM |
187 | eval { getgrgid 1 }; # OP_GGRGID |
188 | eval { getpwnam 1 }; # OP_GPWNAM |
189 | eval { getpwuid 1 }; # OP_GPWUID |
78e1b766 |
190 | prototype "foo"; # OP_PROTOTYPE |
74295f0b |
191 | $a ~~ $b; # OP_SMARTMATCH |
192 | $a <=> $b; # OP_NCMP |
599cee73 |
193 | EXPECT |
42d38218 |
194 | Useless use of repeat (x) in void context at - line 3. |
599cee73 |
195 | Useless use of wantarray in void context at - line 5. |
196 | Useless use of reference-type operator in void context at - line 12. |
197 | Useless use of reference constructor in void context at - line 13. |
d6c467eb |
198 | Useless use of single ref constructor in void context at - line 14. |
599cee73 |
199 | Useless use of defined operator in void context at - line 15. |
200 | Useless use of hex in void context at - line 16. |
201 | Useless use of oct in void context at - line 17. |
202 | Useless use of length in void context at - line 18. |
203 | Useless use of substr in void context at - line 19. |
204 | Useless use of vec in void context at - line 20. |
205 | Useless use of index in void context at - line 21. |
206 | Useless use of rindex in void context at - line 22. |
207 | Useless use of sprintf in void context at - line 23. |
208 | Useless use of array element in void context at - line 24. |
209 | Useless use of array slice in void context at - line 26. |
f1612b5c |
210 | Useless use of hash element in void context at - line 29. |
599cee73 |
211 | Useless use of hash slice in void context at - line 30. |
212 | Useless use of unpack in void context at - line 31. |
213 | Useless use of pack in void context at - line 32. |
297b36dc |
214 | Useless use of join or string in void context at - line 33. |
599cee73 |
215 | Useless use of list slice in void context at - line 34. |
216 | Useless use of sort in void context at - line 37. |
217 | Useless use of reverse in void context at - line 38. |
218 | Useless use of range (or flop) in void context at - line 41. |
219 | Useless use of caller in void context at - line 42. |
220 | Useless use of fileno in void context at - line 43. |
221 | Useless use of eof in void context at - line 44. |
222 | Useless use of tell in void context at - line 45. |
223 | Useless use of readlink in void context at - line 46. |
224 | Useless use of time in void context at - line 47. |
225 | Useless use of localtime in void context at - line 48. |
226 | Useless use of gmtime in void context at - line 49. |
227 | Useless use of getgrnam in void context at - line 50. |
228 | Useless use of getgrgid in void context at - line 51. |
229 | Useless use of getpwnam in void context at - line 52. |
230 | Useless use of getpwuid in void context at - line 53. |
78e1b766 |
231 | Useless use of subroutine prototype in void context at - line 54. |
f5df4782 |
232 | Useless use of smart match in void context at - line 55. |
233 | Useless use of numeric comparison (<=>) in void context at - line 56. |
599cee73 |
234 | ######## |
235 | # op.c |
a801c63c |
236 | use warnings 'void' ; close STDIN ; |
237 | my $x = sort (2,1,3); |
238 | no warnings 'void' ; |
239 | $x = sort (2,1,3); |
240 | EXPECT |
241 | Useless use of sort in scalar context at - line 3. |
242 | ######## |
243 | # op.c |
4438c4b7 |
244 | no warnings 'void' ; close STDIN ; |
0453d815 |
245 | 1 x 3 ; # OP_REPEAT |
246 | # OP_GVSV |
247 | wantarray ; # OP_WANTARRAY |
248 | # OP_GV |
249 | # OP_PADSV |
250 | # OP_PADAV |
251 | # OP_PADHV |
252 | # OP_PADANY |
253 | # OP_AV2ARYLEN |
254 | ref ; # OP_REF |
255 | \@a ; # OP_REFGEN |
256 | \$a ; # OP_SREFGEN |
257 | defined $a ; # OP_DEFINED |
258 | hex $a ; # OP_HEX |
259 | oct $a ; # OP_OCT |
260 | length $a ; # OP_LENGTH |
261 | substr $a,1 ; # OP_SUBSTR |
262 | vec $a,1,2 ; # OP_VEC |
263 | index $a,1,2 ; # OP_INDEX |
264 | rindex $a,1,2 ; # OP_RINDEX |
265 | sprintf $a ; # OP_SPRINTF |
266 | $a[0] ; # OP_AELEM |
267 | # OP_AELEMFAST |
268 | @a[0] ; # OP_ASLICE |
269 | #values %a ; # OP_VALUES |
270 | #keys %a ; # OP_KEYS |
271 | $a{0} ; # OP_HELEM |
272 | @a{0} ; # OP_HSLICE |
273 | unpack "a", "a" ; # OP_UNPACK |
274 | pack $a,"" ; # OP_PACK |
275 | join "" ; # OP_JOIN |
276 | (@a)[0,1] ; # OP_LSLICE |
277 | # OP_ANONLIST |
278 | # OP_ANONHASH |
279 | sort(1,2) ; # OP_SORT |
280 | reverse(1,2) ; # OP_REVERSE |
281 | # OP_RANGE |
282 | # OP_FLIP |
283 | (1 ..2) ; # OP_FLOP |
284 | caller ; # OP_CALLER |
285 | fileno STDIN ; # OP_FILENO |
286 | eof STDIN ; # OP_EOF |
287 | tell STDIN ; # OP_TELL |
288 | readlink 1; # OP_READLINK |
289 | time ; # OP_TIME |
290 | localtime ; # OP_LOCALTIME |
291 | gmtime ; # OP_GMTIME |
292 | eval { getgrnam 1 }; # OP_GGRNAM |
293 | eval { getgrgid 1 }; # OP_GGRGID |
294 | eval { getpwnam 1 }; # OP_GPWNAM |
295 | eval { getpwuid 1 }; # OP_GPWUID |
78e1b766 |
296 | prototype "foo"; # OP_PROTOTYPE |
0453d815 |
297 | EXPECT |
298 | ######## |
299 | # op.c |
4438c4b7 |
300 | use warnings 'void' ; |
68c73484 |
301 | for (@{[0]}) { "$_" } # check warning isn't duplicated |
4438c4b7 |
302 | no warnings 'void' ; |
0453d815 |
303 | for (@{[0]}) { "$_" } # check warning isn't duplicated |
68c73484 |
304 | EXPECT |
305 | Useless use of string in void context at - line 3. |
306 | ######## |
307 | # op.c |
4438c4b7 |
308 | use warnings 'void' ; |
599cee73 |
309 | use Config ; |
310 | BEGIN { |
311 | if ( ! $Config{d_telldir}) { |
312 | print <<EOM ; |
313 | SKIPPED |
314 | # telldir not present |
315 | EOM |
316 | exit |
317 | } |
318 | } |
319 | telldir 1 ; # OP_TELLDIR |
4438c4b7 |
320 | no warnings 'void' ; |
0453d815 |
321 | telldir 1 ; # OP_TELLDIR |
599cee73 |
322 | EXPECT |
323 | Useless use of telldir in void context at - line 13. |
324 | ######## |
325 | # op.c |
4438c4b7 |
326 | use warnings 'void' ; |
599cee73 |
327 | use Config ; |
328 | BEGIN { |
329 | if ( ! $Config{d_getppid}) { |
330 | print <<EOM ; |
331 | SKIPPED |
332 | # getppid not present |
333 | EOM |
334 | exit |
335 | } |
336 | } |
337 | getppid ; # OP_GETPPID |
4438c4b7 |
338 | no warnings 'void' ; |
0453d815 |
339 | getppid ; # OP_GETPPID |
599cee73 |
340 | EXPECT |
341 | Useless use of getppid in void context at - line 13. |
342 | ######## |
343 | # op.c |
4438c4b7 |
344 | use warnings 'void' ; |
599cee73 |
345 | use Config ; |
346 | BEGIN { |
347 | if ( ! $Config{d_getpgrp}) { |
348 | print <<EOM ; |
349 | SKIPPED |
350 | # getpgrp not present |
351 | EOM |
352 | exit |
353 | } |
354 | } |
355 | getpgrp ; # OP_GETPGRP |
4438c4b7 |
356 | no warnings 'void' ; |
0453d815 |
357 | getpgrp ; # OP_GETPGRP |
599cee73 |
358 | EXPECT |
359 | Useless use of getpgrp in void context at - line 13. |
360 | ######## |
361 | # op.c |
4438c4b7 |
362 | use warnings 'void' ; |
599cee73 |
363 | use Config ; |
364 | BEGIN { |
365 | if ( ! $Config{d_times}) { |
366 | print <<EOM ; |
367 | SKIPPED |
368 | # times not present |
369 | EOM |
370 | exit |
371 | } |
372 | } |
373 | times ; # OP_TMS |
4438c4b7 |
374 | no warnings 'void' ; |
0453d815 |
375 | times ; # OP_TMS |
599cee73 |
376 | EXPECT |
377 | Useless use of times in void context at - line 13. |
378 | ######## |
379 | # op.c |
4438c4b7 |
380 | use warnings 'void' ; |
599cee73 |
381 | use Config ; |
382 | BEGIN { |
e96326af |
383 | if ( ! $Config{d_getprior} or $^O eq 'os2') { # Locks before fixpak22 |
599cee73 |
384 | print <<EOM ; |
385 | SKIPPED |
386 | # getpriority not present |
387 | EOM |
388 | exit |
389 | } |
390 | } |
391 | getpriority 1,2; # OP_GETPRIORITY |
4438c4b7 |
392 | no warnings 'void' ; |
0453d815 |
393 | getpriority 1,2; # OP_GETPRIORITY |
599cee73 |
394 | EXPECT |
395 | Useless use of getpriority in void context at - line 13. |
396 | ######## |
397 | # op.c |
4438c4b7 |
398 | use warnings 'void' ; |
599cee73 |
399 | use Config ; |
400 | BEGIN { |
401 | if ( ! $Config{d_getlogin}) { |
402 | print <<EOM ; |
403 | SKIPPED |
404 | # getlogin not present |
405 | EOM |
406 | exit |
407 | } |
408 | } |
409 | getlogin ; # OP_GETLOGIN |
4438c4b7 |
410 | no warnings 'void' ; |
0453d815 |
411 | getlogin ; # OP_GETLOGIN |
599cee73 |
412 | EXPECT |
413 | Useless use of getlogin in void context at - line 13. |
414 | ######## |
415 | # op.c |
4438c4b7 |
416 | use warnings 'void' ; |
599cee73 |
417 | use Config ; BEGIN { |
418 | if ( ! $Config{d_socket}) { |
419 | print <<EOM ; |
420 | SKIPPED |
421 | # getsockname not present |
422 | # getpeername not present |
423 | # gethostbyname not present |
424 | # gethostbyaddr not present |
425 | # gethostent not present |
426 | # getnetbyname not present |
427 | # getnetbyaddr not present |
428 | # getnetent not present |
429 | # getprotobyname not present |
430 | # getprotobynumber not present |
431 | # getprotoent not present |
432 | # getservbyname not present |
433 | # getservbyport not present |
434 | # getservent not present |
435 | EOM |
436 | exit |
437 | } } |
438 | getsockname STDIN ; # OP_GETSOCKNAME |
439 | getpeername STDIN ; # OP_GETPEERNAME |
440 | gethostbyname 1 ; # OP_GHBYNAME |
441 | gethostbyaddr 1,2; # OP_GHBYADDR |
442 | gethostent ; # OP_GHOSTENT |
443 | getnetbyname 1 ; # OP_GNBYNAME |
444 | getnetbyaddr 1,2 ; # OP_GNBYADDR |
445 | getnetent ; # OP_GNETENT |
446 | getprotobyname 1; # OP_GPBYNAME |
447 | getprotobynumber 1; # OP_GPBYNUMBER |
448 | getprotoent ; # OP_GPROTOENT |
449 | getservbyname 1,2; # OP_GSBYNAME |
450 | getservbyport 1,2; # OP_GSBYPORT |
451 | getservent ; # OP_GSERVENT |
0453d815 |
452 | |
4438c4b7 |
453 | no warnings 'void' ; |
0453d815 |
454 | getsockname STDIN ; # OP_GETSOCKNAME |
455 | getpeername STDIN ; # OP_GETPEERNAME |
456 | gethostbyname 1 ; # OP_GHBYNAME |
457 | gethostbyaddr 1,2; # OP_GHBYADDR |
458 | gethostent ; # OP_GHOSTENT |
459 | getnetbyname 1 ; # OP_GNBYNAME |
460 | getnetbyaddr 1,2 ; # OP_GNBYADDR |
461 | getnetent ; # OP_GNETENT |
462 | getprotobyname 1; # OP_GPBYNAME |
463 | getprotobynumber 1; # OP_GPBYNUMBER |
464 | getprotoent ; # OP_GPROTOENT |
465 | getservbyname 1,2; # OP_GSBYNAME |
466 | getservbyport 1,2; # OP_GSBYPORT |
467 | getservent ; # OP_GSERVENT |
dfe13c55 |
468 | INIT { |
469 | # some functions may not be there, so we exit without running |
470 | exit; |
471 | } |
599cee73 |
472 | EXPECT |
473 | Useless use of getsockname in void context at - line 24. |
474 | Useless use of getpeername in void context at - line 25. |
475 | Useless use of gethostbyname in void context at - line 26. |
476 | Useless use of gethostbyaddr in void context at - line 27. |
477 | Useless use of gethostent in void context at - line 28. |
478 | Useless use of getnetbyname in void context at - line 29. |
479 | Useless use of getnetbyaddr in void context at - line 30. |
480 | Useless use of getnetent in void context at - line 31. |
481 | Useless use of getprotobyname in void context at - line 32. |
482 | Useless use of getprotobynumber in void context at - line 33. |
483 | Useless use of getprotoent in void context at - line 34. |
484 | Useless use of getservbyname in void context at - line 35. |
485 | Useless use of getservbyport in void context at - line 36. |
486 | Useless use of getservent in void context at - line 37. |
487 | ######## |
488 | # op.c |
4438c4b7 |
489 | use warnings 'void' ; |
599cee73 |
490 | *a ; # OP_RV2GV |
491 | $a ; # OP_RV2SV |
492 | @a ; # OP_RV2AV |
493 | %a ; # OP_RV2HV |
4438c4b7 |
494 | no warnings 'void' ; |
0453d815 |
495 | *a ; # OP_RV2GV |
496 | $a ; # OP_RV2SV |
497 | @a ; # OP_RV2AV |
498 | %a ; # OP_RV2HV |
599cee73 |
499 | EXPECT |
500 | Useless use of a variable in void context at - line 3. |
501 | Useless use of a variable in void context at - line 4. |
502 | Useless use of a variable in void context at - line 5. |
503 | Useless use of a variable in void context at - line 6. |
504 | ######## |
505 | # op.c |
4438c4b7 |
506 | use warnings 'void' ; |
599cee73 |
507 | "abc"; # OP_CONST |
508 | 7 ; # OP_CONST |
86f9315f |
509 | "x" . "y"; # optimized to OP_CONST |
510 | 2 + 2; # optimized to OP_CONST |
e7fec78e |
511 | use constant U => undef; |
fa01e093 |
512 | U; |
513 | 5 || print "bad\n"; # test OPpCONST_SHORTCIRCUIT |
e7fec78e |
514 | print "boo\n" if U; # test OPpCONST_SHORTCIRCUIT |
2e0ae2d3 |
515 | $[ = 2; # should not warn |
4438c4b7 |
516 | no warnings 'void' ; |
0453d815 |
517 | "abc"; # OP_CONST |
518 | 7 ; # OP_CONST |
86f9315f |
519 | "x" . "y"; # optimized to OP_CONST |
520 | 2 + 2; # optimized to OP_CONST |
599cee73 |
521 | EXPECT |
86f9315f |
522 | Useless use of a constant (abc) in void context at - line 3. |
523 | Useless use of a constant (7) in void context at - line 4. |
524 | Useless use of a constant (xy) in void context at - line 5. |
525 | Useless use of a constant (4) in void context at - line 6. |
fa01e093 |
526 | Useless use of a constant (undef) in void context at - line 8. |
599cee73 |
527 | ######## |
528 | # op.c |
7f01dc7a |
529 | # |
e476b1b5 |
530 | use warnings 'misc' ; |
b08e453b |
531 | my $a ; my @a = () ; my %a = () ; my $b = \@a ; my $c = \%a ;my $d = 'test'; |
599cee73 |
532 | @a =~ /abc/ ; |
533 | @a =~ s/a/b/ ; |
534 | @a =~ tr/a/b/ ; |
535 | @$b =~ /abc/ ; |
536 | @$b =~ s/a/b/ ; |
537 | @$b =~ tr/a/b/ ; |
538 | %a =~ /abc/ ; |
539 | %a =~ s/a/b/ ; |
540 | %a =~ tr/a/b/ ; |
541 | %$c =~ /abc/ ; |
542 | %$c =~ s/a/b/ ; |
543 | %$c =~ tr/a/b/ ; |
b08e453b |
544 | $d =~ tr/a/b/d ; |
545 | $d =~ tr/a/bc/; |
0453d815 |
546 | { |
e476b1b5 |
547 | no warnings 'misc' ; |
b08e453b |
548 | my $a ; my @a = () ; my %a = () ; my $b = \@a ; my $c = \%a ; my $d = 'test'; |
0453d815 |
549 | @a =~ /abc/ ; |
550 | @a =~ s/a/b/ ; |
551 | @a =~ tr/a/b/ ; |
552 | @$b =~ /abc/ ; |
553 | @$b =~ s/a/b/ ; |
554 | @$b =~ tr/a/b/ ; |
555 | %a =~ /abc/ ; |
556 | %a =~ s/a/b/ ; |
557 | %a =~ tr/a/b/ ; |
558 | %$c =~ /abc/ ; |
559 | %$c =~ s/a/b/ ; |
560 | %$c =~ tr/a/b/ ; |
b08e453b |
561 | $d =~ tr/a/b/d ; |
562 | $d =~ tr/a/bc/ ; |
0453d815 |
563 | } |
599cee73 |
564 | EXPECT |
42d38218 |
565 | Applying pattern match (m//) to @array will act on scalar(@array) at - line 5. |
566 | Applying substitution (s///) to @array will act on scalar(@array) at - line 6. |
f1612b5c |
567 | Applying transliteration (tr///) to @array will act on scalar(@array) at - line 7. |
42d38218 |
568 | Applying pattern match (m//) to @array will act on scalar(@array) at - line 8. |
569 | Applying substitution (s///) to @array will act on scalar(@array) at - line 9. |
f1612b5c |
570 | Applying transliteration (tr///) to @array will act on scalar(@array) at - line 10. |
42d38218 |
571 | Applying pattern match (m//) to %hash will act on scalar(%hash) at - line 11. |
572 | Applying substitution (s///) to %hash will act on scalar(%hash) at - line 12. |
f1612b5c |
573 | Applying transliteration (tr///) to %hash will act on scalar(%hash) at - line 13. |
42d38218 |
574 | Applying pattern match (m//) to %hash will act on scalar(%hash) at - line 14. |
575 | Applying substitution (s///) to %hash will act on scalar(%hash) at - line 15. |
f1612b5c |
576 | Applying transliteration (tr///) to %hash will act on scalar(%hash) at - line 16. |
b08e453b |
577 | Useless use of /d modifier in transliteration operator at - line 17. |
578 | Replacement list is longer than search list at - line 18. |
24944567 |
579 | Can't modify private array in substitution (s///) at - line 6, near "s/a/b/ ;" |
b08e453b |
580 | BEGIN not safe after errors--compilation aborted at - line 20. |
599cee73 |
581 | ######## |
582 | # op.c |
8473848f |
583 | use warnings 'parenthesis' ; |
599cee73 |
584 | my $a, $b = (1,2); |
8473848f |
585 | my @foo,%bar, $quux; # there's a TAB here |
bac662ee |
586 | my $x, $y or print; |
8473848f |
587 | no warnings 'parenthesis' ; |
0453d815 |
588 | my $c, $d = (1,2); |
599cee73 |
589 | EXPECT |
df5b6949 |
590 | Parentheses missing around "my" list at - line 3. |
8473848f |
591 | Parentheses missing around "my" list at - line 4. |
599cee73 |
592 | ######## |
593 | # op.c |
8473848f |
594 | use warnings 'parenthesis' ; |
595 | our $a, $b = (1,2); |
596 | no warnings 'parenthesis' ; |
597 | our $c, $d = (1,2); |
598 | EXPECT |
599 | Parentheses missing around "our" list at - line 3. |
600 | ######## |
601 | # op.c |
602 | use warnings 'parenthesis' ; |
599cee73 |
603 | local $a, $b = (1,2); |
8473848f |
604 | local *f, *g; |
605 | no warnings 'parenthesis' ; |
0453d815 |
606 | local $c, $d = (1,2); |
599cee73 |
607 | EXPECT |
df5b6949 |
608 | Parentheses missing around "local" list at - line 3. |
8473848f |
609 | Parentheses missing around "local" list at - line 4. |
599cee73 |
610 | ######## |
611 | # op.c |
e476b1b5 |
612 | use warnings 'bareword' ; |
599cee73 |
613 | print (ABC || 1) ; |
e476b1b5 |
614 | no warnings 'bareword' ; |
0453d815 |
615 | print (ABC || 1) ; |
599cee73 |
616 | EXPECT |
34d09196 |
617 | Bareword found in conditional at - line 3. |
599cee73 |
618 | ######## |
619 | --FILE-- abc |
620 | |
621 | --FILE-- |
622 | # op.c |
e476b1b5 |
623 | use warnings 'misc' ; |
599cee73 |
624 | open FH, "<abc" ; |
625 | $x = 1 if $x = <FH> ; |
e476b1b5 |
626 | no warnings 'misc' ; |
0453d815 |
627 | $x = 1 if $x = <FH> ; |
599cee73 |
628 | EXPECT |
629 | Value of <HANDLE> construct can be "0"; test with defined() at - line 4. |
630 | ######## |
631 | # op.c |
e476b1b5 |
632 | use warnings 'misc' ; |
599cee73 |
633 | opendir FH, "." ; |
634 | $x = 1 if $x = readdir FH ; |
e476b1b5 |
635 | no warnings 'misc' ; |
0453d815 |
636 | $x = 1 if $x = readdir FH ; |
599cee73 |
637 | closedir FH ; |
638 | EXPECT |
639 | Value of readdir() operator can be "0"; test with defined() at - line 4. |
640 | ######## |
641 | # op.c |
e476b1b5 |
642 | use warnings 'misc' ; |
599cee73 |
643 | $x = 1 if $x = <*> ; |
e476b1b5 |
644 | no warnings 'misc' ; |
0453d815 |
645 | $x = 1 if $x = <*> ; |
599cee73 |
646 | EXPECT |
647 | Value of glob construct can be "0"; test with defined() at - line 3. |
648 | ######## |
649 | # op.c |
e476b1b5 |
650 | use warnings 'misc' ; |
599cee73 |
651 | %a = (1,2,3,4) ; |
652 | $x = 1 if $x = each %a ; |
e476b1b5 |
653 | no warnings 'misc' ; |
0453d815 |
654 | $x = 1 if $x = each %a ; |
599cee73 |
655 | EXPECT |
656 | Value of each() operator can be "0"; test with defined() at - line 4. |
657 | ######## |
658 | # op.c |
e476b1b5 |
659 | use warnings 'misc' ; |
599cee73 |
660 | $x = 1 while $x = <*> and 0 ; |
e476b1b5 |
661 | no warnings 'misc' ; |
0453d815 |
662 | $x = 1 while $x = <*> and 0 ; |
599cee73 |
663 | EXPECT |
664 | Value of glob construct can be "0"; test with defined() at - line 3. |
665 | ######## |
666 | # op.c |
e476b1b5 |
667 | use warnings 'misc' ; |
599cee73 |
668 | opendir FH, "." ; |
669 | $x = 1 while $x = readdir FH and 0 ; |
e476b1b5 |
670 | no warnings 'misc' ; |
0453d815 |
671 | $x = 1 while $x = readdir FH and 0 ; |
599cee73 |
672 | closedir FH ; |
673 | EXPECT |
674 | Value of readdir() operator can be "0"; test with defined() at - line 4. |
675 | ######## |
676 | # op.c |
59e10468 |
677 | use warnings 'misc'; |
678 | open FH, "<abc"; |
59e10468 |
679 | ($_ = <FH>) // ($_ = 1); |
680 | opendir DH, "."; |
59e10468 |
681 | %a = (1,2,3,4) ; |
59e10468 |
682 | EXPECT |
683 | ######## |
684 | # op.c |
4438c4b7 |
685 | use warnings 'redefine' ; |
599cee73 |
686 | sub fred {} |
687 | sub fred {} |
4438c4b7 |
688 | no warnings 'redefine' ; |
0453d815 |
689 | sub fred {} |
599cee73 |
690 | EXPECT |
691 | Subroutine fred redefined at - line 4. |
692 | ######## |
693 | # op.c |
4438c4b7 |
694 | use warnings 'redefine' ; |
599cee73 |
695 | sub fred () { 1 } |
696 | sub fred () { 1 } |
4438c4b7 |
697 | no warnings 'redefine' ; |
0453d815 |
698 | sub fred () { 1 } |
599cee73 |
699 | EXPECT |
700 | Constant subroutine fred redefined at - line 4. |
701 | ######## |
702 | # op.c |
036b4402 |
703 | no warnings 'redefine' ; |
704 | sub fred () { 1 } |
705 | sub fred () { 2 } |
706 | EXPECT |
707 | Constant subroutine fred redefined at - line 4. |
708 | ######## |
709 | # op.c |
710 | no warnings 'redefine' ; |
711 | sub fred () { 1 } |
712 | *fred = sub () { 2 }; |
713 | EXPECT |
910764e6 |
714 | Constant subroutine main::fred redefined at - line 4. |
036b4402 |
715 | ######## |
716 | # op.c |
4438c4b7 |
717 | use warnings 'redefine' ; |
599cee73 |
718 | format FRED = |
719 | . |
720 | format FRED = |
721 | . |
4438c4b7 |
722 | no warnings 'redefine' ; |
0453d815 |
723 | format FRED = |
724 | . |
599cee73 |
725 | EXPECT |
726 | Format FRED redefined at - line 5. |
727 | ######## |
728 | # op.c |
599cee73 |
729 | push FRED; |
e476b1b5 |
730 | no warnings 'deprecated' ; |
0453d815 |
731 | push FRED; |
599cee73 |
732 | EXPECT |
d1d15184 |
733 | Array @FRED missing the @ in argument 1 of push() at - line 2. |
599cee73 |
734 | ######## |
735 | # op.c |
599cee73 |
736 | @a = keys FRED ; |
e476b1b5 |
737 | no warnings 'deprecated' ; |
0453d815 |
738 | @a = keys FRED ; |
599cee73 |
739 | EXPECT |
d1d15184 |
740 | Hash %FRED missing the % in argument 1 of keys() at - line 2. |
599cee73 |
741 | ######## |
742 | # op.c |
4438c4b7 |
743 | use warnings 'syntax' ; |
dfe13c55 |
744 | exec "$^X -e 1" ; |
599cee73 |
745 | my $a |
746 | EXPECT |
7b903762 |
747 | Statement unlikely to be reached at - line 4. |
cc507455 |
748 | (Maybe you meant system() when you said exec()?) |
69794302 |
749 | ######## |
750 | # op.c |
69794302 |
751 | my @a; defined(@a); |
752 | EXPECT |
d1d15184 |
753 | defined(@array) is deprecated at - line 2. |
cc507455 |
754 | (Maybe you should just omit the defined()?) |
69794302 |
755 | ######## |
756 | # op.c |
69794302 |
757 | defined(@a = (1,2,3)); |
758 | EXPECT |
d1d15184 |
759 | defined(@array) is deprecated at - line 2. |
cc507455 |
760 | (Maybe you should just omit the defined()?) |
69794302 |
761 | ######## |
762 | # op.c |
69794302 |
763 | my %h; defined(%h); |
764 | EXPECT |
d1d15184 |
765 | defined(%hash) is deprecated at - line 2. |
cc507455 |
766 | (Maybe you should just omit the defined()?) |
0453d815 |
767 | ######## |
768 | # op.c |
4438c4b7 |
769 | no warnings 'syntax' ; |
0453d815 |
770 | exec "$^X -e 1" ; |
771 | my $a |
772 | EXPECT |
773 | |
774 | ######## |
775 | # op.c |
776 | sub fred(); |
777 | sub fred($) {} |
778 | EXPECT |
779 | Prototype mismatch: sub main::fred () vs ($) at - line 3. |
780 | ######## |
781 | # op.c |
782 | $^W = 0 ; |
783 | sub fred() ; |
784 | sub fred($) {} |
785 | { |
e476b1b5 |
786 | no warnings 'prototype' ; |
0453d815 |
787 | sub Fred() ; |
788 | sub Fred($) {} |
e476b1b5 |
789 | use warnings 'prototype' ; |
0453d815 |
790 | sub freD() ; |
791 | sub freD($) {} |
792 | } |
793 | sub FRED() ; |
794 | sub FRED($) {} |
795 | EXPECT |
796 | Prototype mismatch: sub main::fred () vs ($) at - line 4. |
797 | Prototype mismatch: sub main::freD () vs ($) at - line 11. |
798 | Prototype mismatch: sub main::FRED () vs ($) at - line 14. |
eb6e2d6f |
799 | ######## |
800 | # op.c |
801 | use warnings 'syntax' ; |
802 | join /---/, 'x', 'y', 'z'; |
803 | EXPECT |
804 | /---/ should probably be written as "---" at - line 3. |
767a6a26 |
805 | ######## |
806 | # op.c [Perl_peep] |
e476b1b5 |
807 | use warnings 'prototype' ; |
767a6a26 |
808 | fred() ; |
809 | sub fred ($$) {} |
e476b1b5 |
810 | no warnings 'prototype' ; |
767a6a26 |
811 | joe() ; |
812 | sub joe ($$) {} |
813 | EXPECT |
814 | main::fred() called too early to check prototype at - line 3. |
ddda08b7 |
815 | ######## |
816 | # op.c [Perl_newATTRSUB] |
817 | --FILE-- abc.pm |
818 | use warnings 'void' ; |
819 | BEGIN { $| = 1; print "in begin\n"; } |
820 | CHECK { print "in check\n"; } |
821 | INIT { print "in init\n"; } |
822 | END { print "in end\n"; } |
823 | print "in mainline\n"; |
824 | 1; |
825 | --FILE-- |
826 | use abc; |
827 | delete $INC{"abc.pm"}; |
828 | require abc; |
829 | do "abc.pm"; |
830 | EXPECT |
831 | in begin |
832 | in mainline |
833 | in check |
834 | in init |
835 | in begin |
836 | Too late to run CHECK block at abc.pm line 3. |
837 | Too late to run INIT block at abc.pm line 4. |
838 | in mainline |
839 | in begin |
840 | Too late to run CHECK block at abc.pm line 3. |
841 | Too late to run INIT block at abc.pm line 4. |
842 | in mainline |
843 | in end |
844 | in end |
845 | in end |
846 | ######## |
847 | # op.c [Perl_newATTRSUB] |
848 | --FILE-- abc.pm |
849 | no warnings 'void' ; |
850 | BEGIN { $| = 1; print "in begin\n"; } |
851 | CHECK { print "in check\n"; } |
852 | INIT { print "in init\n"; } |
853 | END { print "in end\n"; } |
854 | print "in mainline\n"; |
855 | 1; |
856 | --FILE-- |
857 | require abc; |
858 | do "abc.pm"; |
859 | EXPECT |
860 | in begin |
861 | in mainline |
862 | in begin |
863 | in mainline |
864 | in end |
865 | in end |
936edb8b |
866 | ######## |
867 | # op.c |
868 | my @x; |
f87c3213 |
869 | use warnings 'syntax' ; |
936edb8b |
870 | push(@x); |
871 | unshift(@x); |
f87c3213 |
872 | no warnings 'syntax' ; |
936edb8b |
873 | push(@x); |
874 | unshift(@x); |
875 | EXPECT |
de4864e4 |
876 | Useless use of push with no values at - line 4. |
877 | Useless use of unshift with no values at - line 5. |
a27978d3 |
878 | ######## |
879 | # op.c |
f34840d8 |
880 | # 20020401 mjd@plover.com at suggestion of jfriedl@yahoo.com |
881 | use warnings 'regexp'; |
882 | split /blah/g, "blah"; |
883 | no warnings 'regexp'; |
884 | split /blah/g, "blah"; |
885 | EXPECT |
886 | Use of /g modifier is meaningless in split at - line 4. |
276b2a0c |
887 | ######## |
888 | # op.c |
889 | use warnings 'precedence'; |
890 | $a = $b & $c == $d; |
891 | $a = $b ^ $c != $d; |
892 | $a = $b | $c > $d; |
893 | $a = $b < $c & $d; |
894 | $a = $b >= $c ^ $d; |
895 | $a = $b <= $c | $d; |
896 | $a = $b <=> $c & $d; |
2b84528b |
897 | $a &= $b == $c; $a |= $b == $c; $a ^= $b == $c; # shouldn't warn |
276b2a0c |
898 | no warnings 'precedence'; |
899 | $a = $b & $c == $d; |
900 | $a = $b ^ $c != $d; |
901 | $a = $b | $c > $d; |
902 | $a = $b < $c & $d; |
903 | $a = $b >= $c ^ $d; |
904 | $a = $b <= $c | $d; |
905 | $a = $b <=> $c & $d; |
906 | EXPECT |
907 | Possible precedence problem on bitwise & operator at - line 3. |
908 | Possible precedence problem on bitwise ^ operator at - line 4. |
909 | Possible precedence problem on bitwise | operator at - line 5. |
910 | Possible precedence problem on bitwise & operator at - line 6. |
911 | Possible precedence problem on bitwise ^ operator at - line 7. |
912 | Possible precedence problem on bitwise | operator at - line 8. |
913 | Possible precedence problem on bitwise & operator at - line 9. |
914 | ######## |
915 | # op.c |
916 | use integer; |
917 | use warnings 'precedence'; |
918 | $a = $b & $c == $d; |
919 | $a = $b ^ $c != $d; |
920 | $a = $b | $c > $d; |
921 | $a = $b < $c & $d; |
922 | $a = $b >= $c ^ $d; |
923 | $a = $b <= $c | $d; |
924 | $a = $b <=> $c & $d; |
925 | no warnings 'precedence'; |
926 | $a = $b & $c == $d; |
927 | $a = $b ^ $c != $d; |
928 | $a = $b | $c > $d; |
929 | $a = $b < $c & $d; |
930 | $a = $b >= $c ^ $d; |
931 | $a = $b <= $c | $d; |
932 | $a = $b <=> $c & $d; |
933 | EXPECT |
934 | Possible precedence problem on bitwise & operator at - line 4. |
935 | Possible precedence problem on bitwise ^ operator at - line 5. |
936 | Possible precedence problem on bitwise | operator at - line 6. |
937 | Possible precedence problem on bitwise & operator at - line 7. |
938 | Possible precedence problem on bitwise ^ operator at - line 8. |
939 | Possible precedence problem on bitwise | operator at - line 9. |
940 | Possible precedence problem on bitwise & operator at - line 10. |
ddeae0f1 |
941 | ######## |
942 | # op.c |
943 | |
944 | # ok => local() has desired effect; |
945 | # ignore=> local() silently ignored |
946 | |
947 | use warnings 'syntax'; |
948 | |
949 | local(undef); # OP_UNDEF ignore |
950 | sub lval : lvalue {}; |
951 | local(lval()); # OP_ENTERSUB |
952 | local($x **= 1); # OP_POW |
953 | local($x *= 1); # OP_MULTIPLY |
954 | local($x /= 1); # OP_DIVIDE |
955 | local($x %= 1); # OP_MODULO |
956 | local($x x= 1); # OP_REPEAT |
957 | local($x += 1); # OP_ADD |
958 | local($x -= 1); # OP_SUBTRACT |
959 | local($x .= 1); # OP_CONCAT |
960 | local($x <<= 1); # OP_LEFT_SHIFT |
961 | local($x >>= 1); # OP_RIGHT_SHIFT |
962 | local($x &= 1); # OP_BIT_AND |
963 | local($x ^= 1); # OP_BIT_XOR |
964 | local($x |= 1); # OP_BIT_OR |
965 | { |
966 | use integer; |
967 | local($x *= 1); # OP_I_MULTIPLY |
968 | local($x /= 1); # OP_I_DIVIDE |
969 | local($x %= 1); # OP_I_MODULO |
970 | local($x += 1); # OP_I_ADD |
971 | local($x -= 1); # OP_I_SUBTRACT |
972 | } |
973 | local($x?$y:$z) = 1; # OP_COND_EXPR ok |
974 | # these two are fatal run-time errors instead |
975 | #local(@$a); # OP_RV2AV ok |
976 | #local(%$a); # OP_RV2HV ok |
977 | local(*a); # OP_RV2GV ok |
978 | local(@a[1,2]); # OP_ASLICE ok |
979 | local(@a{1,2}); # OP_HSLICE ok |
980 | local(@a = (1,2)); # OP_AASSIGN |
981 | local($$x); # OP_RV2SV ok |
982 | local($#a); # OP_AV2ARYLEN |
983 | local($x = 1); # OP_SASSIGN |
984 | local($x &&= 1); # OP_ANDASSIGN |
985 | local($x ||= 1); # OP_ORASSIGN |
986 | local($x //= 1); # OP_DORASSIGN |
987 | local($a[0]); # OP_AELEMFAST ok |
988 | |
989 | local(substr($x,0,1)); # OP_SUBSTR |
990 | local(pos($x)); # OP_POS |
991 | local(vec($x,0,1)); # OP_VEC |
992 | local($a[$b]); # OP_AELEM ok |
993 | local($a{$b}); # OP_HELEM ok |
54dc0f91 |
994 | local($[); # OP_CONST |
ddeae0f1 |
995 | |
996 | no warnings 'syntax'; |
997 | EXPECT |
998 | Useless localization of subroutine entry at - line 10. |
999 | Useless localization of exponentiation (**) at - line 11. |
1000 | Useless localization of multiplication (*) at - line 12. |
1001 | Useless localization of division (/) at - line 13. |
1002 | Useless localization of modulus (%) at - line 14. |
1003 | Useless localization of repeat (x) at - line 15. |
1004 | Useless localization of addition (+) at - line 16. |
1005 | Useless localization of subtraction (-) at - line 17. |
1006 | Useless localization of concatenation (.) or string at - line 18. |
1007 | Useless localization of left bitshift (<<) at - line 19. |
1008 | Useless localization of right bitshift (>>) at - line 20. |
1009 | Useless localization of bitwise and (&) at - line 21. |
1010 | Useless localization of bitwise xor (^) at - line 22. |
1011 | Useless localization of bitwise or (|) at - line 23. |
1012 | Useless localization of integer multiplication (*) at - line 26. |
1013 | Useless localization of integer division (/) at - line 27. |
1014 | Useless localization of integer modulus (%) at - line 28. |
1015 | Useless localization of integer addition (+) at - line 29. |
1016 | Useless localization of integer subtraction (-) at - line 30. |
1017 | Useless localization of list assignment at - line 39. |
1018 | Useless localization of array length at - line 41. |
1019 | Useless localization of scalar assignment at - line 42. |
1020 | Useless localization of logical and assignment (&&=) at - line 43. |
1021 | Useless localization of logical or assignment (||=) at - line 44. |
1022 | Useless localization of defined or assignment (//=) at - line 45. |
1023 | Useless localization of substr at - line 48. |
1024 | Useless localization of match position at - line 49. |
1025 | Useless localization of vec at - line 50. |
7921d0f2 |
1026 | ######## |
1027 | # op.c |
7921d0f2 |
1028 | my $x1 if 0; |
1029 | my @x2 if 0; |
1030 | my %x3 if 0; |
1031 | my ($x4) if 0; |
1032 | my ($x5,@x6, %x7) if 0; |
1033 | 0 && my $z1; |
1034 | 0 && my (%z2); |
1035 | # these shouldn't warn |
1036 | our $x if 0; |
1037 | our $x unless 0; |
1038 | if (0) { my $w1 } |
1039 | if (my $w2) { $a=1 } |
1040 | if ($a && (my $w3 = 1)) {$a = 2} |
1041 | |
1042 | EXPECT |
d1d15184 |
1043 | Deprecated use of my() in false conditional at - line 2. |
7921d0f2 |
1044 | Deprecated use of my() in false conditional at - line 3. |
1045 | Deprecated use of my() in false conditional at - line 4. |
1046 | Deprecated use of my() in false conditional at - line 5. |
1047 | Deprecated use of my() in false conditional at - line 6. |
1048 | Deprecated use of my() in false conditional at - line 7. |
1049 | Deprecated use of my() in false conditional at - line 8. |
55b67815 |
1050 | ######## |
1051 | # op.c |
1052 | $[ = 1; |
1053 | use warnings 'deprecated'; |
1054 | $[ = 2; |
1055 | no warnings 'deprecated'; |
1056 | $[ = 3; |
1057 | EXPECT |
d1d15184 |
1058 | Use of assignment to $[ is deprecated at - line 2. |
55b67815 |
1059 | Use of assignment to $[ is deprecated at - line 4. |
75068674 |
1060 | ######## |
1061 | # op.c |
1062 | use warnings 'void'; |
1063 | @x = split /y/, "z"; |
1064 | $x = split /y/, "z"; |
1065 | split /y/, "z"; |
1066 | no warnings 'void'; |
1067 | @x = split /y/, "z"; |
1068 | $x = split /y/, "z"; |
1069 | split /y/, "z"; |
1070 | EXPECT |
1071 | Useless use of split in void context at - line 5. |