Commit | Line | Data |
---|---|---|
599cee73 PM |
1 | toke.c AOK |
2 | ||
3 | we seem to have lost a few ambiguous warnings!! | |
4 | ||
5 | ||
599cee73 PM |
6 | $a = <<; |
7 | Use of comma-less variable list is deprecated | |
8 | (called 3 times via depcom) | |
9 | ||
10 | \1 better written as $1 | |
4438c4b7 | 11 | use warnings 'syntax' ; |
599cee73 PM |
12 | s/(abc)/\1/; |
13 | ||
14 | warn(warn_nosemi) | |
15 | Semicolon seems to be missing | |
16 | $a = 1 | |
17 | &time ; | |
18 | ||
19 | ||
20 | Reversed %c= operator | |
21 | my $a =+ 2 ; | |
22 | $a =- 2 ; | |
23 | $a =* 2 ; | |
24 | $a =% 2 ; | |
25 | $a =& 2 ; | |
26 | $a =. 2 ; | |
27 | $a =^ 2 ; | |
28 | $a =| 2 ; | |
29 | $a =< 2 ; | |
30 | $a =/ 2 ; | |
31 | ||
32 | Multidimensional syntax %.*s not supported | |
33 | my $a = $a[1,2] ; | |
34 | ||
35 | You need to quote \"%s\"" | |
36 | sub fred {} ; $SIG{TERM} = fred; | |
37 | ||
38 | Scalar value %.*s better written as $%.*s" | |
39 | @a[3] = 2; | |
40 | @a{3} = 2; | |
41 | ||
42 | Can't use \\%c to mean $%c in expression | |
43 | $_ = "ab" ; s/(ab)/\1/e; | |
44 | ||
45 | Unquoted string "abc" may clash with future reserved word at - line 3. | |
46 | warn(warn_reserved | |
47 | $a = abc; | |
48 | ||
599cee73 PM |
49 | Possible attempt to separate words with commas |
50 | @a = qw(a, b, c) ; | |
51 | ||
52 | Possible attempt to put comments in qw() list | |
53 | @a = qw(a b # c) ; | |
54 | ||
599cee73 PM |
55 | %s (...) interpreted as function |
56 | print ("") | |
57 | printf ("") | |
58 | sort ("") | |
59 | ||
60 | Ambiguous use of %c{%s%s} resolved to %c%s%s | |
61 | $a = ${time[2]} | |
62 | $a = ${time{2}} | |
63 | ||
64 | ||
65 | Ambiguous use of %c{%s} resolved to %c%s | |
66 | $a = ${time} | |
67 | sub fred {} $a = ${fred} | |
68 | ||
69 | Misplaced _ in number | |
70 | $a = 1_2; | |
71 | $a = 1_2345_6; | |
72 | ||
73 | Bareword \"%s\" refers to nonexistent package | |
74 | $a = FRED:: ; | |
75 | ||
76 | Ambiguous call resolved as CORE::%s(), qualify as such or use & | |
77 | sub time {} | |
78 | my $a = time() | |
79 | ||
767a6a26 PM |
80 | Unrecognized escape \\%c passed through |
81 | $a = "\m" ; | |
82 | ||
820438b1 | 83 | Useless use of \\E. |
52ed07f6 BF |
84 | $a = "abcd\E" ; |
85 | ||
767a6a26 PM |
86 | %s number > %s non-portable |
87 | my $a = 0b011111111111111111111111111111110 ; | |
88 | $a = 0b011111111111111111111111111111111 ; | |
89 | $a = 0b111111111111111111111111111111111 ; | |
90 | $a = 0x0fffffffe ; | |
91 | $a = 0x0ffffffff ; | |
92 | $a = 0x1ffffffff ; | |
93 | $a = 0037777777776 ; | |
94 | $a = 0037777777777 ; | |
95 | $a = 0047777777777 ; | |
96 | ||
97 | Integer overflow in binary number | |
98 | my $a = 0b011111111111111111111111111111110 ; | |
99 | $a = 0b011111111111111111111111111111111 ; | |
100 | $a = 0b111111111111111111111111111111111 ; | |
101 | $a = 0x0fffffffe ; | |
102 | $a = 0x0ffffffff ; | |
103 | $a = 0x1ffffffff ; | |
104 | $a = 0037777777776 ; | |
105 | $a = 0037777777777 ; | |
106 | $a = 0047777777777 ; | |
ac206dc8 RGS |
107 | |
108 | dump() better written as CORE::dump() | |
4ac733c9 MJD |
109 | |
110 | Use of /c modifier is meaningless without /g | |
111 | ||
64e578a2 MJD |
112 | Use of /c modifier is meaningless in s/// |
113 | ||
0453d815 PM |
114 | Mandatory Warnings |
115 | ------------------ | |
116 | Use of "%s" without parentheses is ambiguous [check_uni] | |
117 | rand + 4 | |
118 | ||
119 | Ambiguous use of -%s resolved as -&%s() [yylex] | |
120 | sub fred {} ; - fred ; | |
121 | ||
122 | Precedence problem: open %.*s should be open(%.*s) [yylex] | |
123 | open FOO || die; | |
124 | ||
125 | Operator or semicolon missing before %c%s [yylex] | |
126 | Ambiguous use of %c resolved as operator %c | |
127 | *foo *foo | |
128 | ||
599cee73 PM |
129 | __END__ |
130 | # toke.c | |
599cee73 PM |
131 | format STDOUT = |
132 | @<<< @||| @>>> @>>> | |
133 | $a $b "abc" 'def' | |
134 | . | |
4438c4b7 | 135 | no warnings 'deprecated' ; |
0453d815 PM |
136 | format STDOUT = |
137 | @<<< @||| @>>> @>>> | |
138 | $a $b "abc" 'def' | |
139 | . | |
599cee73 | 140 | EXPECT |
d1d15184 NC |
141 | Use of comma-less variable list is deprecated at - line 4. |
142 | Use of comma-less variable list is deprecated at - line 4. | |
143 | Use of comma-less variable list is deprecated at - line 4. | |
599cee73 PM |
144 | ######## |
145 | # toke.c | |
e6897b1a | 146 | $a =~ m/$foo/sand $bar; |
aa78b661 | 147 | $a =~ s/$foo/fool/sand $bar; |
599cee73 PM |
148 | $a = <<; |
149 | ||
4438c4b7 | 150 | no warnings 'deprecated' ; |
e6897b1a | 151 | $a =~ m/$foo/sand $bar; |
aa78b661 | 152 | $a =~ s/$foo/fool/sand $bar; |
0453d815 PM |
153 | $a = <<; |
154 | ||
599cee73 | 155 | EXPECT |
e6897b1a | 156 | Having no space between pattern and following word is deprecated at - line 2. |
aa78b661 KW |
157 | Having no space between pattern and following word is deprecated at - line 3. |
158 | Use of bare << to mean <<"" is deprecated at - line 4. | |
599cee73 PM |
159 | ######## |
160 | # toke.c | |
4438c4b7 | 161 | use warnings 'syntax' ; |
599cee73 | 162 | s/(abc)/\1/; |
4438c4b7 | 163 | no warnings 'syntax' ; |
0453d815 | 164 | s/(abc)/\1/; |
599cee73 PM |
165 | EXPECT |
166 | \1 better written as $1 at - line 3. | |
167 | ######## | |
168 | # toke.c | |
4438c4b7 | 169 | use warnings 'semicolon' ; |
599cee73 PM |
170 | $a = 1 |
171 | &time ; | |
4438c4b7 | 172 | no warnings 'semicolon' ; |
0453d815 PM |
173 | $a = 1 |
174 | &time ; | |
599cee73 PM |
175 | EXPECT |
176 | Semicolon seems to be missing at - line 3. | |
177 | ######## | |
178 | # toke.c | |
4438c4b7 | 179 | use warnings 'syntax' ; |
599cee73 PM |
180 | my $a =+ 2 ; |
181 | $a =- 2 ; | |
182 | $a =* 2 ; | |
183 | $a =% 2 ; | |
184 | $a =& 2 ; | |
185 | $a =. 2 ; | |
186 | $a =^ 2 ; | |
187 | $a =| 2 ; | |
188 | $a =< 2 ; | |
189 | $a =/ 2 ; | |
190 | EXPECT | |
7f01dc7a JH |
191 | Reversed += operator at - line 3. |
192 | Reversed -= operator at - line 4. | |
193 | Reversed *= operator at - line 5. | |
194 | Reversed %= operator at - line 6. | |
195 | Reversed &= operator at - line 7. | |
196 | Reversed .= operator at - line 8. | |
197 | Reversed ^= operator at - line 9. | |
198 | Reversed |= operator at - line 10. | |
199 | Reversed <= operator at - line 11. | |
200 | syntax error at - line 8, near "=." | |
201 | syntax error at - line 9, near "=^" | |
202 | syntax error at - line 10, near "=|" | |
203 | Unterminated <> operator at - line 11. | |
599cee73 PM |
204 | ######## |
205 | # toke.c | |
4438c4b7 | 206 | no warnings 'syntax' ; |
0453d815 PM |
207 | my $a =+ 2 ; |
208 | $a =- 2 ; | |
209 | $a =* 2 ; | |
210 | $a =% 2 ; | |
211 | $a =& 2 ; | |
212 | $a =. 2 ; | |
213 | $a =^ 2 ; | |
214 | $a =| 2 ; | |
215 | $a =< 2 ; | |
216 | $a =/ 2 ; | |
217 | EXPECT | |
7f01dc7a JH |
218 | syntax error at - line 8, near "=." |
219 | syntax error at - line 9, near "=^" | |
220 | syntax error at - line 10, near "=|" | |
221 | Unterminated <> operator at - line 11. | |
0453d815 PM |
222 | ######## |
223 | # toke.c | |
4438c4b7 | 224 | use warnings 'syntax' ; |
599cee73 | 225 | my $a = $a[1,2] ; |
4438c4b7 | 226 | no warnings 'syntax' ; |
0453d815 | 227 | my $a = $a[1,2] ; |
599cee73 PM |
228 | EXPECT |
229 | Multidimensional syntax $a[1,2] not supported at - line 3. | |
230 | ######## | |
231 | # toke.c | |
4438c4b7 | 232 | use warnings 'syntax' ; |
599cee73 | 233 | sub fred {} ; $SIG{TERM} = fred; |
4438c4b7 | 234 | no warnings 'syntax' ; |
0453d815 | 235 | $SIG{TERM} = fred; |
599cee73 PM |
236 | EXPECT |
237 | You need to quote "fred" at - line 3. | |
238 | ######## | |
239 | # toke.c | |
4c01a014 BF |
240 | use utf8; |
241 | use open qw( :utf8 :std ); | |
242 | use warnings 'syntax' ; | |
243 | sub frèd {} ; $SIG{TERM} = frèd; | |
244 | no warnings 'syntax' ; | |
245 | $SIG{TERM} = frèd; | |
246 | EXPECT | |
247 | You need to quote "frèd" at - line 5. | |
248 | ######## | |
249 | # toke.c | |
250 | use utf8; | |
251 | use open qw( :utf8 :std ); | |
252 | use warnings 'syntax' ; | |
253 | sub ふれど {} ; $SIG{TERM} = ふれど; | |
254 | no warnings 'syntax' ; | |
255 | $SIG{TERM} = ふれど; | |
256 | EXPECT | |
257 | You need to quote "ふれど" at - line 5. | |
258 | ######## | |
259 | # toke.c | |
4438c4b7 | 260 | use warnings 'syntax' ; |
599cee73 PM |
261 | @a[3] = 2; |
262 | @a{3} = 2; | |
4438c4b7 | 263 | no warnings 'syntax' ; |
0453d815 PM |
264 | @a[3] = 2; |
265 | @a{3} = 2; | |
599cee73 PM |
266 | EXPECT |
267 | Scalar value @a[3] better written as $a[3] at - line 3. | |
268 | Scalar value @a{3} better written as $a{3} at - line 4. | |
269 | ######## | |
270 | # toke.c | |
b9e186cd BF |
271 | use utf8; |
272 | use open qw( :utf8 :std ); | |
273 | use warnings 'syntax' ; | |
274 | @à[3] = 2; | |
275 | @à{3} = 2; | |
276 | no warnings 'syntax' ; | |
277 | @à[3] = 2; | |
278 | @à{3} = 2; | |
279 | EXPECT | |
280 | Scalar value @à[3] better written as $à[3] at - line 5. | |
281 | Scalar value @à{3} better written as $à{3} at - line 6. | |
282 | ######## | |
283 | # toke.c | |
284 | use utf8; | |
285 | use open qw( :utf8 :std ); | |
286 | use warnings 'syntax' ; | |
287 | @ぁ[3] = 2; | |
288 | @ぁ{3} = 2; | |
289 | no warnings 'syntax' ; | |
290 | @ぁ[3] = 2; | |
291 | @ぁ{3} = 2; | |
292 | EXPECT | |
293 | Scalar value @ぁ[3] better written as $ぁ[3] at - line 5. | |
294 | Scalar value @ぁ{3} better written as $ぁ{3} at - line 6. | |
295 | ######## | |
296 | # toke.c | |
4438c4b7 | 297 | use warnings 'syntax' ; |
599cee73 PM |
298 | $_ = "ab" ; |
299 | s/(ab)/\1/e; | |
4438c4b7 | 300 | no warnings 'syntax' ; |
0453d815 PM |
301 | $_ = "ab" ; |
302 | s/(ab)/\1/e; | |
599cee73 PM |
303 | EXPECT |
304 | Can't use \1 to mean $1 in expression at - line 4. | |
305 | ######## | |
306 | # toke.c | |
4438c4b7 | 307 | use warnings 'reserved' ; |
599cee73 | 308 | $a = abc; |
1c3923b3 GS |
309 | $a = { def |
310 | ||
311 | => 1 }; | |
4438c4b7 | 312 | no warnings 'reserved' ; |
0453d815 | 313 | $a = abc; |
599cee73 PM |
314 | EXPECT |
315 | Unquoted string "abc" may clash with future reserved word at - line 3. | |
316 | ######## | |
317 | # toke.c | |
e476b1b5 | 318 | use warnings 'qw' ; |
599cee73 | 319 | @a = qw(a, b, c) ; |
e476b1b5 | 320 | no warnings 'qw' ; |
0453d815 | 321 | @a = qw(a, b, c) ; |
599cee73 PM |
322 | EXPECT |
323 | Possible attempt to separate words with commas at - line 3. | |
324 | ######## | |
325 | # toke.c | |
e476b1b5 | 326 | use warnings 'qw' ; |
7e03b518 | 327 | @a = qw(a b c # #) ; |
e476b1b5 | 328 | no warnings 'qw' ; |
7e03b518 | 329 | @a = qw(a b c # #) ; |
599cee73 PM |
330 | EXPECT |
331 | Possible attempt to put comments in qw() list at - line 3. | |
332 | ######## | |
333 | # toke.c | |
7e03b518 EB |
334 | use warnings 'qw' ; |
335 | @a = qw(a, b, c # #) ; | |
336 | no warnings 'qw' ; | |
337 | @a = qw(a, b, c # #) ; | |
338 | EXPECT | |
339 | Possible attempt to separate words with commas at - line 3. | |
340 | Possible attempt to put comments in qw() list at - line 3. | |
341 | ######## | |
342 | # toke.c | |
4438c4b7 | 343 | use warnings 'syntax' ; |
b1439985 RGS |
344 | print (""); |
345 | print ("") and $x = 1; | |
346 | print ("") or die; | |
347 | print ("") // die; | |
348 | print (1+2) * 3 if 0; # only this one should warn | |
349 | print (1+2) if 0; | |
599cee73 | 350 | EXPECT |
b1439985 | 351 | print (...) interpreted as function at - line 7. |
599cee73 PM |
352 | ######## |
353 | # toke.c | |
4438c4b7 | 354 | no warnings 'syntax' ; |
0453d815 PM |
355 | print ("") |
356 | EXPECT | |
357 | ||
358 | ######## | |
359 | # toke.c | |
4438c4b7 | 360 | use warnings 'syntax' ; |
b1439985 RGS |
361 | printf (""); |
362 | printf ("") . ''; | |
599cee73 | 363 | EXPECT |
b1439985 | 364 | printf (...) interpreted as function at - line 4. |
599cee73 PM |
365 | ######## |
366 | # toke.c | |
4438c4b7 | 367 | no warnings 'syntax' ; |
0453d815 PM |
368 | printf ("") |
369 | EXPECT | |
370 | ||
371 | ######## | |
372 | # toke.c | |
4438c4b7 | 373 | use warnings 'syntax' ; |
b1439985 RGS |
374 | sort (""); |
375 | sort ("") . ''; | |
599cee73 | 376 | EXPECT |
b1439985 | 377 | sort (...) interpreted as function at - line 4. |
599cee73 PM |
378 | ######## |
379 | # toke.c | |
4438c4b7 | 380 | no warnings 'syntax' ; |
0453d815 PM |
381 | sort ("") |
382 | EXPECT | |
383 | ||
384 | ######## | |
385 | # toke.c | |
4438c4b7 | 386 | use warnings 'ambiguous' ; |
599cee73 | 387 | $a = ${time[2]}; |
4438c4b7 | 388 | no warnings 'ambiguous' ; |
0453d815 | 389 | $a = ${time[2]}; |
599cee73 PM |
390 | EXPECT |
391 | Ambiguous use of ${time[...]} resolved to $time[...] at - line 3. | |
392 | ######## | |
393 | # toke.c | |
4438c4b7 | 394 | use warnings 'ambiguous' ; |
599cee73 PM |
395 | $a = ${time{2}}; |
396 | EXPECT | |
397 | Ambiguous use of ${time{...}} resolved to $time{...} at - line 3. | |
398 | ######## | |
399 | # toke.c | |
4438c4b7 | 400 | no warnings 'ambiguous' ; |
0453d815 PM |
401 | $a = ${time{2}}; |
402 | EXPECT | |
403 | ||
404 | ######## | |
405 | # toke.c | |
4438c4b7 | 406 | use warnings 'ambiguous' ; |
599cee73 | 407 | $a = ${time} ; |
4438c4b7 | 408 | no warnings 'ambiguous' ; |
0453d815 | 409 | $a = ${time} ; |
599cee73 PM |
410 | EXPECT |
411 | Ambiguous use of ${time} resolved to $time at - line 3. | |
412 | ######## | |
413 | # toke.c | |
4438c4b7 | 414 | use warnings 'ambiguous' ; |
599cee73 PM |
415 | sub fred {} |
416 | $a = ${fred} ; | |
4438c4b7 | 417 | no warnings 'ambiguous' ; |
0453d815 | 418 | $a = ${fred} ; |
599cee73 PM |
419 | EXPECT |
420 | Ambiguous use of ${fred} resolved to $fred at - line 4. | |
421 | ######## | |
422 | # toke.c | |
4438c4b7 | 423 | use warnings 'syntax' ; |
7fd134d9 JH |
424 | $a = _123; print "$a\n"; #( 3 string) |
425 | $a = 1_23; print "$a\n"; | |
426 | $a = 12_3; print "$a\n"; | |
427 | $a = 123_; print "$a\n"; # 6 | |
428 | $a = _+123; print "$a\n"; # 7 string) | |
429 | $a = +_123; print "$a\n"; #( 8 string) | |
430 | $a = +1_23; print "$a\n"; | |
431 | $a = +12_3; print "$a\n"; | |
432 | $a = +123_; print "$a\n"; # 11 | |
433 | $a = _-123; print "$a\n"; #(12 string) | |
434 | $a = -_123; print "$a\n"; #(13 string) | |
435 | $a = -1_23; print "$a\n"; | |
436 | $a = -12_3; print "$a\n"; | |
437 | $a = -123_; print "$a\n"; # 16 | |
438 | $a = 123._456; print "$a\n"; # 17 | |
439 | $a = 123.4_56; print "$a\n"; | |
440 | $a = 123.45_6; print "$a\n"; | |
441 | $a = 123.456_; print "$a\n"; # 20 | |
442 | $a = +123._456; print "$a\n"; # 21 | |
443 | $a = +123.4_56; print "$a\n"; | |
444 | $a = +123.45_6; print "$a\n"; | |
445 | $a = +123.456_; print "$a\n"; # 24 | |
446 | $a = -123._456; print "$a\n"; # 25 | |
447 | $a = -123.4_56; print "$a\n"; | |
448 | $a = -123.45_6; print "$a\n"; | |
449 | $a = -123.456_; print "$a\n"; # 28 | |
2bea9a37 JH |
450 | $a = 123.456E_12; printf("%.0f\n", $a); # 29 |
451 | $a = 123.456E1_2; printf("%.0f\n", $a); | |
452 | $a = 123.456E12_; printf("%.0f\n", $a); # 31 | |
453 | $a = 123.456E_+12; printf("%.0f\n", $a); # 32 | |
454 | $a = 123.456E+_12; printf("%.0f\n", $a); # 33 | |
455 | $a = 123.456E+1_2; printf("%.0f\n", $a); | |
456 | $a = 123.456E+12_; printf("%.0f\n", $a); # 35 | |
7fd134d9 JH |
457 | $a = 123.456E_-12; print "$a\n"; # 36 |
458 | $a = 123.456E-_12; print "$a\n"; # 37 | |
459 | $a = 123.456E-1_2; print "$a\n"; | |
460 | $a = 123.456E-12_; print "$a\n"; # 39 | |
b3b48e3e JH |
461 | $a = 1__23; print "$a\n"; # 40 |
462 | $a = 12.3__4; print "$a\n"; # 41 | |
2bea9a37 | 463 | $a = 12.34e1__2; printf("%.0f\n", $a); # 42 |
4438c4b7 | 464 | no warnings 'syntax' ; |
7fd134d9 JH |
465 | $a = _123; print "$a\n"; |
466 | $a = 1_23; print "$a\n"; | |
467 | $a = 12_3; print "$a\n"; | |
468 | $a = 123_; print "$a\n"; | |
469 | $a = _+123; print "$a\n"; | |
470 | $a = +_123; print "$a\n"; | |
471 | $a = +1_23; print "$a\n"; | |
472 | $a = +12_3; print "$a\n"; | |
473 | $a = +123_; print "$a\n"; | |
474 | $a = _-123; print "$a\n"; | |
475 | $a = -_123; print "$a\n"; | |
476 | $a = -1_23; print "$a\n"; | |
477 | $a = -12_3; print "$a\n"; | |
478 | $a = -123_; print "$a\n"; | |
479 | $a = 123._456; print "$a\n"; | |
480 | $a = 123.4_56; print "$a\n"; | |
481 | $a = 123.45_6; print "$a\n"; | |
482 | $a = 123.456_; print "$a\n"; | |
483 | $a = +123._456; print "$a\n"; | |
484 | $a = +123.4_56; print "$a\n"; | |
485 | $a = +123.45_6; print "$a\n"; | |
486 | $a = +123.456_; print "$a\n"; | |
487 | $a = -123._456; print "$a\n"; | |
488 | $a = -123.4_56; print "$a\n"; | |
489 | $a = -123.45_6; print "$a\n"; | |
490 | $a = -123.456_; print "$a\n"; | |
2bea9a37 JH |
491 | $a = 123.456E_12; printf("%.0f\n", $a); |
492 | $a = 123.456E1_2; printf("%.0f\n", $a); | |
493 | $a = 123.456E12_; printf("%.0f\n", $a); | |
494 | $a = 123.456E_+12; printf("%.0f\n", $a); | |
495 | $a = 123.456E+_12; printf("%.0f\n", $a); | |
496 | $a = 123.456E+1_2; printf("%.0f\n", $a); | |
497 | $a = 123.456E+12_; printf("%.0f\n", $a); | |
7fd134d9 JH |
498 | $a = 123.456E_-12; print "$a\n"; |
499 | $a = 123.456E-_12; print "$a\n"; | |
500 | $a = 123.456E-1_2; print "$a\n"; | |
501 | $a = 123.456E-12_; print "$a\n"; | |
b3b48e3e JH |
502 | $a = 1__23; print "$a\n"; |
503 | $a = 12.3__4; print "$a\n"; | |
2bea9a37 | 504 | $a = 12.34e1__2; printf("%.0f\n", $a); |
599cee73 | 505 | EXPECT |
fbfa96bd | 506 | OPTIONS regex |
928753ea | 507 | Misplaced _ in number at - line 6. |
928753ea | 508 | Misplaced _ in number at - line 11. |
7fd134d9 | 509 | Misplaced _ in number at - line 16. |
928753ea | 510 | Misplaced _ in number at - line 17. |
7fd134d9 | 511 | Misplaced _ in number at - line 20. |
928753ea | 512 | Misplaced _ in number at - line 21. |
7fd134d9 JH |
513 | Misplaced _ in number at - line 24. |
514 | Misplaced _ in number at - line 25. | |
515 | Misplaced _ in number at - line 28. | |
516 | Misplaced _ in number at - line 29. | |
517 | Misplaced _ in number at - line 31. | |
518 | Misplaced _ in number at - line 32. | |
519 | Misplaced _ in number at - line 33. | |
520 | Misplaced _ in number at - line 35. | |
521 | Misplaced _ in number at - line 36. | |
522 | Misplaced _ in number at - line 37. | |
523 | Misplaced _ in number at - line 39. | |
b3b48e3e JH |
524 | Misplaced _ in number at - line 40. |
525 | Misplaced _ in number at - line 41. | |
526 | Misplaced _ in number at - line 42. | |
928753ea JH |
527 | _123 |
528 | 123 | |
928753ea | 529 | 123 |
7fd134d9 JH |
530 | 123 |
531 | 123 | |
532 | _123 | |
533 | 123 | |
534 | 123 | |
535 | 123 | |
536 | -123 | |
537 | -_123 | |
538 | -123 | |
539 | -123 | |
540 | -123 | |
541 | 123.456 | |
542 | 123.456 | |
543 | 123.456 | |
544 | 123.456 | |
545 | 123.456 | |
546 | 123.456 | |
547 | 123.456 | |
548 | 123.456 | |
549 | -123.456 | |
550 | -123.456 | |
551 | -123.456 | |
552 | -123.456 | |
553 | 123456000000000 | |
554 | 123456000000000 | |
555 | 123456000000000 | |
556 | 123456000000000 | |
557 | 123456000000000 | |
558 | 123456000000000 | |
559 | 123456000000000 | |
fbfa96bd NIS |
560 | 1.23456e-0?10 |
561 | 1.23456e-0?10 | |
562 | 1.23456e-0?10 | |
563 | 1.23456e-0?10 | |
b3b48e3e JH |
564 | 123 |
565 | 12.34 | |
566 | 12340000000000 | |
7fd134d9 JH |
567 | _123 |
568 | 123 | |
569 | 123 | |
570 | 123 | |
571 | 123 | |
572 | _123 | |
573 | 123 | |
574 | 123 | |
575 | 123 | |
576 | -123 | |
577 | -_123 | |
578 | -123 | |
579 | -123 | |
580 | -123 | |
581 | 123.456 | |
582 | 123.456 | |
583 | 123.456 | |
584 | 123.456 | |
585 | 123.456 | |
928753ea JH |
586 | 123.456 |
587 | 123.456 | |
928753ea | 588 | 123.456 |
7fd134d9 JH |
589 | -123.456 |
590 | -123.456 | |
591 | -123.456 | |
592 | -123.456 | |
593 | 123456000000000 | |
594 | 123456000000000 | |
595 | 123456000000000 | |
596 | 123456000000000 | |
597 | 123456000000000 | |
598 | 123456000000000 | |
599 | 123456000000000 | |
fbfa96bd NIS |
600 | 1.23456e-0?10 |
601 | 1.23456e-0?10 | |
602 | 1.23456e-0?10 | |
603 | 1.23456e-0?10 | |
b3b48e3e JH |
604 | 123 |
605 | 12.34 | |
606 | 12340000000000 | |
599cee73 PM |
607 | ######## |
608 | # toke.c | |
e476b1b5 | 609 | use warnings 'bareword' ; |
60e6418e | 610 | #line 25 "bar" |
599cee73 | 611 | $a = FRED:: ; |
e476b1b5 | 612 | no warnings 'bareword' ; |
0453d815 PM |
613 | #line 25 "bar" |
614 | $a = FRED:: ; | |
599cee73 | 615 | EXPECT |
60e6418e | 616 | Bareword "FRED::" refers to nonexistent package at bar line 25. |
599cee73 PM |
617 | ######## |
618 | # toke.c | |
4438c4b7 | 619 | use warnings 'ambiguous' ; |
599cee73 | 620 | sub time {} |
0453d815 | 621 | my $a = time() ; |
4438c4b7 | 622 | no warnings 'ambiguous' ; |
0453d815 | 623 | my $b = time() ; |
599cee73 PM |
624 | EXPECT |
625 | Ambiguous call resolved as CORE::time(), qualify as such or use & at - line 4. | |
626 | ######## | |
627 | # toke.c | |
26d16222 | 628 | use warnings ; |
0453d815 | 629 | eval <<'EOE'; |
df0deb90 GS |
630 | # line 30 "foo" |
631 | warn "yelp"; | |
0453d815 | 632 | { |
0453d815 PM |
633 | $_ = " \x{123} " ; |
634 | } | |
635 | EOE | |
636 | EXPECT | |
df0deb90 | 637 | yelp at foo line 30. |
0453d815 PM |
638 | ######## |
639 | # toke.c | |
0453d815 PM |
640 | my $a = rand + 4 ; |
641 | EXPECT | |
2d5ccbba | 642 | Warning: Use of "rand" without parentheses is ambiguous at - line 2. |
0453d815 PM |
643 | ######## |
644 | # toke.c | |
645 | $^W = 0 ; | |
646 | my $a = rand + 4 ; | |
647 | { | |
4438c4b7 | 648 | no warnings 'ambiguous' ; |
0453d815 | 649 | $a = rand + 4 ; |
4438c4b7 | 650 | use warnings 'ambiguous' ; |
0453d815 PM |
651 | $a = rand + 4 ; |
652 | } | |
653 | $a = rand + 4 ; | |
654 | EXPECT | |
2d5ccbba IT |
655 | Warning: Use of "rand" without parentheses is ambiguous at - line 3. |
656 | Warning: Use of "rand" without parentheses is ambiguous at - line 8. | |
657 | Warning: Use of "rand" without parentheses is ambiguous at - line 10. | |
0453d815 | 658 | ######## |
e19a021b FC |
659 | # [perl #97110] |
660 | sub myrand(;$) { } | |
b5fb7ce3 | 661 | sub whatever($) { } |
e19a021b | 662 | my $a = myrand + 4 ; |
b5fb7ce3 | 663 | my $b = whatever + 4 ; |
e19a021b | 664 | EXPECT |
b5fb7ce3 | 665 | Warning: Use of "myrand" without parentheses is ambiguous at - line 4. |
e19a021b | 666 | ######## |
0453d815 | 667 | # toke.c |
e8ae98db RGS |
668 | use warnings "ambiguous"; |
669 | print for keys %+; # should not warn | |
670 | EXPECT | |
671 | ######## | |
672 | # toke.c | |
0453d815 PM |
673 | sub fred {}; |
674 | -fred ; | |
675 | EXPECT | |
676 | Ambiguous use of -fred resolved as -&fred() at - line 3. | |
677 | ######## | |
678 | # toke.c | |
679 | $^W = 0 ; | |
680 | sub fred {} ; | |
681 | -fred ; | |
682 | { | |
4438c4b7 | 683 | no warnings 'ambiguous' ; |
0453d815 | 684 | -fred ; |
4438c4b7 | 685 | use warnings 'ambiguous' ; |
0453d815 PM |
686 | -fred ; |
687 | } | |
688 | -fred ; | |
689 | EXPECT | |
690 | Ambiguous use of -fred resolved as -&fred() at - line 4. | |
691 | Ambiguous use of -fred resolved as -&fred() at - line 9. | |
692 | Ambiguous use of -fred resolved as -&fred() at - line 11. | |
693 | ######## | |
694 | # toke.c | |
695 | open FOO || time; | |
240d1b6f | 696 | open local *FOO; # should be ok |
0453d815 PM |
697 | EXPECT |
698 | Precedence problem: open FOO should be open(FOO) at - line 2. | |
699 | ######## | |
66fbe8fb HS |
700 | # toke.c (and [perl #16184]) |
701 | open FOO => "<&0"; close FOO; | |
702 | EXPECT | |
703 | ######## | |
0453d815 PM |
704 | # toke.c |
705 | $^W = 0 ; | |
706 | open FOO || time; | |
707 | { | |
e476b1b5 | 708 | no warnings 'precedence' ; |
0453d815 | 709 | open FOO || time; |
e476b1b5 | 710 | use warnings 'precedence' ; |
0453d815 PM |
711 | open FOO || time; |
712 | } | |
713 | open FOO || time; | |
db3abe52 | 714 | open Foo::BAR; # this should not warn |
0453d815 PM |
715 | EXPECT |
716 | Precedence problem: open FOO should be open(FOO) at - line 3. | |
717 | Precedence problem: open FOO should be open(FOO) at - line 8. | |
718 | Precedence problem: open FOO should be open(FOO) at - line 10. | |
719 | ######## | |
720 | # toke.c | |
721 | $^W = 0 ; | |
722 | *foo *foo ; | |
723 | { | |
4438c4b7 | 724 | no warnings 'ambiguous' ; |
0453d815 | 725 | *foo *foo ; |
4438c4b7 | 726 | use warnings 'ambiguous' ; |
0453d815 PM |
727 | *foo *foo ; |
728 | } | |
729 | *foo *foo ; | |
730 | EXPECT | |
731 | Operator or semicolon missing before *foo at - line 3. | |
732 | Ambiguous use of * resolved as operator * at - line 3. | |
733 | Operator or semicolon missing before *foo at - line 8. | |
734 | Ambiguous use of * resolved as operator * at - line 8. | |
735 | Operator or semicolon missing before *foo at - line 10. | |
736 | Ambiguous use of * resolved as operator * at - line 10. | |
767a6a26 PM |
737 | ######## |
738 | # toke.c | |
02571fe8 BF |
739 | use utf8; |
740 | use open qw( :utf8 :std ); | |
741 | $^W = 0 ; | |
742 | *foo *foo ; | |
743 | { | |
744 | no warnings 'ambiguous' ; | |
745 | *foo *foo ; | |
746 | use warnings 'ambiguous' ; | |
747 | *foo *foo ; | |
748 | } | |
749 | *foo *foo ; | |
750 | EXPECT | |
751 | Operator or semicolon missing before *foo at - line 5. | |
752 | Ambiguous use of * resolved as operator * at - line 5. | |
753 | Operator or semicolon missing before *foo at - line 10. | |
754 | Ambiguous use of * resolved as operator * at - line 10. | |
755 | Operator or semicolon missing before *foo at - line 12. | |
756 | Ambiguous use of * resolved as operator * at - line 12. | |
757 | ######## | |
758 | # toke.c | |
e476b1b5 | 759 | use warnings 'misc' ; |
767a6a26 | 760 | my $a = "\m" ; |
e476b1b5 | 761 | no warnings 'misc' ; |
767a6a26 PM |
762 | $a = "\m" ; |
763 | EXPECT | |
764 | Unrecognized escape \m passed through at - line 3. | |
765 | ######## | |
766 | # toke.c | |
52ed07f6 BF |
767 | use warnings 'misc' ; |
768 | my $a = "abcd\E" ; | |
769 | no warnings 'misc' ; | |
770 | $a = "abcd\E" ; | |
771 | EXPECT | |
820438b1 | 772 | Useless use of \E at - line 3. |
52ed07f6 BF |
773 | ######## |
774 | # toke.c | |
767a6a26 PM |
775 | use warnings 'portable' ; |
776 | my $a = 0b011111111111111111111111111111110 ; | |
777 | $a = 0b011111111111111111111111111111111 ; | |
778 | $a = 0b111111111111111111111111111111111 ; | |
779 | $a = 0x0fffffffe ; | |
780 | $a = 0x0ffffffff ; | |
781 | $a = 0x1ffffffff ; | |
782 | $a = 0037777777776 ; | |
783 | $a = 0037777777777 ; | |
784 | $a = 0047777777777 ; | |
785 | no warnings 'portable' ; | |
786 | $a = 0b011111111111111111111111111111110 ; | |
787 | $a = 0b011111111111111111111111111111111 ; | |
788 | $a = 0b111111111111111111111111111111111 ; | |
789 | $a = 0x0fffffffe ; | |
790 | $a = 0x0ffffffff ; | |
791 | $a = 0x1ffffffff ; | |
792 | $a = 0037777777776 ; | |
793 | $a = 0037777777777 ; | |
794 | $a = 0047777777777 ; | |
795 | EXPECT | |
796 | Binary number > 0b11111111111111111111111111111111 non-portable at - line 5. | |
797 | Hexadecimal number > 0xffffffff non-portable at - line 8. | |
798 | Octal number > 037777777777 non-portable at - line 11. | |
799 | ######## | |
800 | # toke.c | |
801 | use warnings 'overflow' ; | |
802 | my $a = 0b011111111111111111111111111111110 ; | |
803 | $a = 0b011111111111111111111111111111111 ; | |
15041a67 | 804 | $a = 0b10000000000000000000000000000000000000000000000000000000000000000 ; |
767a6a26 PM |
805 | $a = 0x0fffffffe ; |
806 | $a = 0x0ffffffff ; | |
15041a67 | 807 | $a = 0x10000000000000000 ; |
767a6a26 PM |
808 | $a = 0037777777776 ; |
809 | $a = 0037777777777 ; | |
15041a67 | 810 | $a = 002000000000000000000000; |
767a6a26 PM |
811 | no warnings 'overflow' ; |
812 | $a = 0b011111111111111111111111111111110 ; | |
813 | $a = 0b011111111111111111111111111111111 ; | |
15041a67 | 814 | $a = 0b10000000000000000000000000000000000000000000000000000000000000000 ; |
767a6a26 PM |
815 | $a = 0x0fffffffe ; |
816 | $a = 0x0ffffffff ; | |
15041a67 | 817 | $a = 0x10000000000000000 ; |
767a6a26 PM |
818 | $a = 0037777777776 ; |
819 | $a = 0037777777777 ; | |
15041a67 | 820 | $a = 002000000000000000000000; |
767a6a26 PM |
821 | EXPECT |
822 | Integer overflow in binary number at - line 5. | |
823 | Integer overflow in hexadecimal number at - line 8. | |
824 | Integer overflow in octal number at - line 11. | |
8593bda5 GS |
825 | ######## |
826 | # toke.c | |
ac206dc8 RGS |
827 | BEGIN { $^C = 1; } |
828 | use warnings 'misc'; | |
829 | dump; | |
830 | CORE::dump; | |
831 | EXPECT | |
832 | dump() better written as CORE::dump() at - line 4. | |
833 | - syntax OK | |
834 | ######## | |
835 | # toke.c | |
836 | use warnings 'misc'; | |
837 | use subs qw/dump/; | |
93f09d7b | 838 | sub dump { print "no warning for overridden dump\n"; } |
ac206dc8 RGS |
839 | dump; |
840 | EXPECT | |
93f09d7b | 841 | no warning for overridden dump |
ac206dc8 RGS |
842 | ######## |
843 | # toke.c | |
8593bda5 GS |
844 | use warnings 'ambiguous'; |
845 | "@mjd_previously_unused_array"; | |
846 | no warnings 'ambiguous'; | |
847 | "@mjd_previously_unused_array"; | |
848 | EXPECT | |
849 | Possible unintended interpolation of @mjd_previously_unused_array in string at - line 3. | |
707afd92 MS |
850 | ######## |
851 | # toke.c | |
d8c55666 | 852 | # 20020328 mjd-perl-patch+@plover.com at behest of jfriedl@yahoo.com |
4ac733c9 MJD |
853 | use warnings 'regexp'; |
854 | "foo" =~ /foo/c; | |
64e578a2 | 855 | "foo" =~ /foo/cg; |
4ac733c9 MJD |
856 | no warnings 'regexp'; |
857 | "foo" =~ /foo/c; | |
64e578a2 | 858 | "foo" =~ /foo/cg; |
4ac733c9 MJD |
859 | EXPECT |
860 | Use of /c modifier is meaningless without /g at - line 4. | |
861 | ######## | |
862 | # toke.c | |
d8c55666 | 863 | # 20020328 mjd-perl-patch+@plover.com at behest of jfriedl@yahoo.com |
4ac733c9 MJD |
864 | use warnings 'regexp'; |
865 | $_ = "ab" ; | |
866 | s/ab/ab/c; | |
64e578a2 | 867 | s/ab/ab/cg; |
4ac733c9 MJD |
868 | no warnings 'regexp'; |
869 | s/ab/ab/c; | |
64e578a2 | 870 | s/ab/ab/cg; |
4ac733c9 | 871 | EXPECT |
64e578a2 MJD |
872 | Use of /c modifier is meaningless in s/// at - line 5. |
873 | Use of /c modifier is meaningless in s/// at - line 6. | |
d8c55666 MJD |
874 | ######## |
875 | -wa | |
876 | # toke.c | |
877 | # 20020414 mjd-perl-patch+@plover.com # -a flag should suppress these warnings | |
878 | print "@F\n"; | |
879 | EXPECT | |
880 | ||
881 | ######## | |
882 | -w | |
883 | # toke.c | |
884 | # 20020414 mjd-perl-patch+@plover.com # -a flag should suppress these warnings | |
885 | print "@F\n"; | |
886 | EXPECT | |
887 | Possible unintended interpolation of @F in string at - line 4. | |
888 | Name "main::F" used only once: possible typo at - line 4. | |
889 | ######## | |
890 | -wa | |
891 | # toke.c | |
892 | # 20020414 mjd-perl-patch+@plover.com | |
893 | EXPECT | |
894 | ||
2710853f MJD |
895 | ######## |
896 | # toke.c | |
897 | # 20020414 mjd-perl-patch+@plover.com | |
898 | # In 5.7.3, this emitted "Possible unintended interpolation" warnings | |
899 | use warnings 'ambiguous'; | |
900 | $s = "(@-)(@+)"; | |
901 | EXPECT | |
902 | ||
56da5a46 RGS |
903 | ######## |
904 | # toke.c | |
905 | # mandatory warning | |
906 | eval q/if ($a) { } elseif ($b) { }/; | |
907 | no warnings "syntax"; | |
908 | eval q/if ($a) { } elseif ($b) { }/; | |
909 | EXPECT | |
910 | elseif should be elsif at (eval 1) line 1. | |
911 | ######## | |
912 | # toke.c | |
913 | # mandatory warning | |
914 | eval q/5 6/; | |
915 | no warnings "syntax"; | |
916 | eval q/5 6/; | |
917 | EXPECT | |
918 | Number found where operator expected at (eval 1) line 1, near "5 6" | |
919 | (Missing operator before 6?) | |
984200d0 YST |
920 | ######## |
921 | # toke.c | |
922 | use warnings "syntax"; | |
923 | $_ = $a = 1; | |
924 | $a !=~ /1/; | |
925 | $a !=~ m#1#; | |
926 | $a !=~/1/; | |
927 | $a !=~ ?/?; | |
decca21c YST |
928 | $a !=~ y/1//; |
929 | $a !=~ tr/1//; | |
930 | $a !=~ s/1//; | |
984200d0 YST |
931 | $a != ~/1/; |
932 | no warnings "syntax"; | |
933 | $a !=~ /1/; | |
934 | $a !=~ m#1#; | |
935 | $a !=~/1/; | |
936 | $a !=~ ?/?; | |
decca21c YST |
937 | $a !=~ y/1//; |
938 | $a !=~ tr/1//; | |
939 | $a !=~ s/1//; | |
984200d0 YST |
940 | EXPECT |
941 | !=~ should be !~ at - line 4. | |
942 | !=~ should be !~ at - line 5. | |
943 | !=~ should be !~ at - line 6. | |
944 | !=~ should be !~ at - line 7. | |
decca21c YST |
945 | !=~ should be !~ at - line 8. |
946 | !=~ should be !~ at - line 9. | |
947 | !=~ should be !~ at - line 10. | |
1108974d RGS |
948 | ######## |
949 | # toke.c | |
950 | our $foo :unique; | |
8e5dadda NC |
951 | sub pam :locked; |
952 | sub glipp :locked { | |
953 | } | |
954 | sub whack_eth ($) : locked { | |
955 | } | |
d1d15184 | 956 | no warnings 'deprecated'; |
1108974d | 957 | our $bar :unique; |
8e5dadda NC |
958 | sub zapeth :locked; |
959 | sub ker_plop :locked { | |
960 | } | |
961 | sub swa_a_p ($) : locked { | |
962 | } | |
1108974d | 963 | EXPECT |
d1d15184 NC |
964 | Use of :unique is deprecated at - line 2. |
965 | Use of :locked is deprecated at - line 3. | |
966 | Use of :locked is deprecated at - line 4. | |
967 | Use of :locked is deprecated at - line 6. | |
9e8d7757 RB |
968 | ######## |
969 | # toke.c | |
970 | use warnings "syntax"; | |
971 | sub proto_after_array(@$); | |
972 | sub proto_after_arref(\@$); | |
973 | sub proto_after_arref2(\[@$]); | |
974 | sub proto_after_arref3(\[@$]_); | |
975 | sub proto_after_hash(%$); | |
976 | sub proto_after_hashref(\%$); | |
977 | sub proto_after_hashref2(\[%$]); | |
978 | sub underscore_last_pos($_); | |
979 | sub underscore2($_;$); | |
980 | sub underscore_fail($_$); | |
981 | sub underscore_after_at(@_); | |
982 | no warnings "syntax"; | |
983 | sub proto_after_array(@$); | |
984 | sub proto_after_hash(%$); | |
985 | sub underscore_fail($_$); | |
986 | EXPECT | |
987 | Prototype after '@' for main::proto_after_array : @$ at - line 3. | |
988 | Prototype after '%' for main::proto_after_hash : %$ at - line 7. | |
aef2a98a | 989 | Illegal character after '_' in prototype for main::underscore_fail : $_$ at - line 12. |
9e8d7757 | 990 | Prototype after '@' for main::underscore_after_at : @_ at - line 13. |
77772344 B |
991 | ######## |
992 | # toke.c | |
993 | use warnings "ambiguous"; | |
994 | "foo\nn" =~ /^foo$\n/; | |
995 | "foo\nn" =~ /^foo${\}n/; | |
996 | my $foo = qr/^foo$\n/; | |
997 | my $bar = qr/^foo${\}n/; | |
998 | no warnings "ambiguous"; | |
999 | "foo\nn" =~ /^foo$\n/; | |
1000 | "foo\nn" =~ /^foo${\}n/; | |
1001 | my $foo = qr/^foo$\n/; | |
1002 | my $bar = qr/^foo${\}n/; | |
1003 | EXPECT | |
1004 | Possible unintended interpolation of $\ in regex at - line 3. | |
1005 | Possible unintended interpolation of $\ in regex at - line 5. | |
d83f38d8 NC |
1006 | ######## |
1007 | # toke.c | |
f0a2b745 KW |
1008 | use warnings 'syntax' ; |
1009 | my $a = "\o"; | |
1010 | my $a = "\o{"; | |
1011 | my $a = "\o{}"; | |
1012 | no warnings 'syntax' ; | |
1013 | my $a = "\o"; | |
1014 | my $a = "\o{"; | |
1015 | my $a = "\o{}"; | |
1016 | EXPECT | |
1017 | Missing braces on \o{} at - line 3, within string | |
1018 | Missing right brace on \o{ at - line 4, within string | |
1019 | Number with no digits at - line 5, within string | |
1020 | BEGIN not safe after errors--compilation aborted at - line 6. | |
1021 | ######## | |
1022 | # toke.c | |
1023 | use warnings 'digit' ; | |
1024 | my $a = "\o{1238456}"; | |
1025 | no warnings 'digit' ; | |
1026 | my $a = "\o{1238456}"; | |
1027 | EXPECT | |
1028 | Non-octal character '8'. Resolved as "\o{123}" at - line 3. | |
725a61d7 Z |
1029 | ######## |
1030 | # toke.c | |
1031 | use warnings; | |
1032 | my $a = "foo"; | |
1033 | print $a =~ ?f? ? "yes\n" : "no\n" foreach 0..2; | |
1034 | EXPECT | |
1035 | Use of ?PATTERN? without explicit operator is deprecated at - line 4. | |
1036 | yes | |
1037 | no | |
1038 | no | |
17a3df4c KW |
1039 | ######## |
1040 | # toke.c | |
1041 | use warnings; | |
1042 | my $a = "\c{ack}"; | |
1043 | $a = "\c,"; | |
1044 | $a = "\c`"; | |
1045 | no warnings 'syntax'; | |
1046 | $a = "\c{ack}"; | |
1047 | $a = "\c,"; | |
1048 | $a = "\c`"; | |
1049 | no warnings 'deprecated'; | |
1050 | EXPECT | |
1051 | "\c{" is deprecated and is more clearly written as ";" at - line 3. | |
1052 | "\c," is more clearly written simply as "l" at - line 4. | |
1053 | "\c`" is more clearly written simply as "\ " at - line 5. | |
1054 | "\c{" is deprecated and is more clearly written as ";" at - line 7. | |
3955e1a9 KW |
1055 | ######## |
1056 | # toke.c | |
1057 | use warnings 'syntax' ; | |
1058 | my $a = qr/foo/du; | |
ff3f26d2 | 1059 | $a = qr/foo/lai; |
3955e1a9 | 1060 | $a = qr/foo/lil; |
ff3f26d2 KW |
1061 | $a = qr/foo/aia; |
1062 | $a = qr/foo/aaia; | |
3955e1a9 KW |
1063 | no warnings 'syntax' ; |
1064 | my $a = qr/foo/du; | |
1065 | EXPECT | |
1066 | Regexp modifiers "/d" and "/u" are mutually exclusive at - line 3, near "= " | |
1067 | Regexp modifiers "/l" and "/a" are mutually exclusive at - line 4, near "= " | |
1068 | Regexp modifier "/l" may not appear twice at - line 5, near "= " | |
ff3f26d2 KW |
1069 | Regexp modifier "/a" may appear a maximum of twice at - line 7, near "= " |
1070 | BEGIN not safe after errors--compilation aborted at - line 8. | |
ba05d9aa FC |
1071 | ######## |
1072 | # toke.c | |
1073 | # [perl #4362] | |
1074 | eval "print q\xabfoo"; | |
1075 | print "ok\n" if | |
1076 | $@ =~ /Can't find string terminator "\xab" anywhere before EOF/; | |
1077 | EXPECT | |
1078 | ok |