encoding.t not properly skipped when Encode extension not built
[p5sagit/p5-mst-13.2.git] / t / lib / warnings / toke
CommitLineData
599cee73 1toke.c AOK
2
3 we seem to have lost a few ambiguous warnings!!
4
5
599cee73 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 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 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 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 80 Unrecognized escape \\%c passed through
81 $a = "\m" ;
82
83 %s number > %s non-portable
84 my $a = 0b011111111111111111111111111111110 ;
85 $a = 0b011111111111111111111111111111111 ;
86 $a = 0b111111111111111111111111111111111 ;
87 $a = 0x0fffffffe ;
88 $a = 0x0ffffffff ;
89 $a = 0x1ffffffff ;
90 $a = 0037777777776 ;
91 $a = 0037777777777 ;
92 $a = 0047777777777 ;
93
94 Integer overflow in binary number
95 my $a = 0b011111111111111111111111111111110 ;
96 $a = 0b011111111111111111111111111111111 ;
97 $a = 0b111111111111111111111111111111111 ;
98 $a = 0x0fffffffe ;
99 $a = 0x0ffffffff ;
100 $a = 0x1ffffffff ;
101 $a = 0037777777776 ;
102 $a = 0037777777777 ;
103 $a = 0047777777777 ;
ac206dc8 104
105 dump() better written as CORE::dump()
599cee73 106
0453d815 107 Mandatory Warnings
108 ------------------
109 Use of "%s" without parentheses is ambiguous [check_uni]
110 rand + 4
111
112 Ambiguous use of -%s resolved as -&%s() [yylex]
113 sub fred {} ; - fred ;
114
115 Precedence problem: open %.*s should be open(%.*s) [yylex]
116 open FOO || die;
117
118 Operator or semicolon missing before %c%s [yylex]
119 Ambiguous use of %c resolved as operator %c
120 *foo *foo
121
599cee73 122__END__
123# toke.c
a4f5cc89 124use warnings 'deprecated' ;
599cee73 125format STDOUT =
126@<<< @||| @>>> @>>>
127$a $b "abc" 'def'
128.
4438c4b7 129no warnings 'deprecated' ;
0453d815 130format STDOUT =
131@<<< @||| @>>> @>>>
132$a $b "abc" 'def'
133.
599cee73 134EXPECT
135Use of comma-less variable list is deprecated at - line 5.
136Use of comma-less variable list is deprecated at - line 5.
137Use of comma-less variable list is deprecated at - line 5.
599cee73 138########
139# toke.c
4438c4b7 140use warnings 'deprecated' ;
599cee73 141$a = <<;
142
4438c4b7 143no warnings 'deprecated' ;
0453d815 144$a = <<;
145
599cee73 146EXPECT
147Use of bare << to mean <<"" is deprecated at - line 3.
148########
149# toke.c
4438c4b7 150use warnings 'syntax' ;
599cee73 151s/(abc)/\1/;
4438c4b7 152no warnings 'syntax' ;
0453d815 153s/(abc)/\1/;
599cee73 154EXPECT
155\1 better written as $1 at - line 3.
156########
157# toke.c
4438c4b7 158use warnings 'semicolon' ;
599cee73 159$a = 1
160&time ;
4438c4b7 161no warnings 'semicolon' ;
0453d815 162$a = 1
163&time ;
599cee73 164EXPECT
165Semicolon seems to be missing at - line 3.
166########
167# toke.c
4438c4b7 168use warnings 'syntax' ;
599cee73 169my $a =+ 2 ;
170$a =- 2 ;
171$a =* 2 ;
172$a =% 2 ;
173$a =& 2 ;
174$a =. 2 ;
175$a =^ 2 ;
176$a =| 2 ;
177$a =< 2 ;
178$a =/ 2 ;
179EXPECT
7f01dc7a 180Reversed += operator at - line 3.
181Reversed -= operator at - line 4.
182Reversed *= operator at - line 5.
183Reversed %= operator at - line 6.
184Reversed &= operator at - line 7.
185Reversed .= operator at - line 8.
186Reversed ^= operator at - line 9.
187Reversed |= operator at - line 10.
188Reversed <= operator at - line 11.
189syntax error at - line 8, near "=."
190syntax error at - line 9, near "=^"
191syntax error at - line 10, near "=|"
192Unterminated <> operator at - line 11.
599cee73 193########
194# toke.c
4438c4b7 195no warnings 'syntax' ;
0453d815 196my $a =+ 2 ;
197$a =- 2 ;
198$a =* 2 ;
199$a =% 2 ;
200$a =& 2 ;
201$a =. 2 ;
202$a =^ 2 ;
203$a =| 2 ;
204$a =< 2 ;
205$a =/ 2 ;
206EXPECT
7f01dc7a 207syntax error at - line 8, near "=."
208syntax error at - line 9, near "=^"
209syntax error at - line 10, near "=|"
210Unterminated <> operator at - line 11.
0453d815 211########
212# toke.c
4438c4b7 213use warnings 'syntax' ;
599cee73 214my $a = $a[1,2] ;
4438c4b7 215no warnings 'syntax' ;
0453d815 216my $a = $a[1,2] ;
599cee73 217EXPECT
218Multidimensional syntax $a[1,2] not supported at - line 3.
219########
220# toke.c
4438c4b7 221use warnings 'syntax' ;
599cee73 222sub fred {} ; $SIG{TERM} = fred;
4438c4b7 223no warnings 'syntax' ;
0453d815 224$SIG{TERM} = fred;
599cee73 225EXPECT
226You need to quote "fred" at - line 3.
227########
228# toke.c
4438c4b7 229use warnings 'syntax' ;
599cee73 230@a[3] = 2;
231@a{3} = 2;
4438c4b7 232no warnings 'syntax' ;
0453d815 233@a[3] = 2;
234@a{3} = 2;
599cee73 235EXPECT
236Scalar value @a[3] better written as $a[3] at - line 3.
237Scalar value @a{3} better written as $a{3} at - line 4.
238########
239# toke.c
4438c4b7 240use warnings 'syntax' ;
599cee73 241$_ = "ab" ;
242s/(ab)/\1/e;
4438c4b7 243no warnings 'syntax' ;
0453d815 244$_ = "ab" ;
245s/(ab)/\1/e;
599cee73 246EXPECT
247Can't use \1 to mean $1 in expression at - line 4.
248########
249# toke.c
4438c4b7 250use warnings 'reserved' ;
599cee73 251$a = abc;
1c3923b3 252$a = { def
253
254=> 1 };
4438c4b7 255no warnings 'reserved' ;
0453d815 256$a = abc;
599cee73 257EXPECT
258Unquoted string "abc" may clash with future reserved word at - line 3.
259########
260# toke.c
e476b1b5 261use warnings 'qw' ;
599cee73 262@a = qw(a, b, c) ;
e476b1b5 263no warnings 'qw' ;
0453d815 264@a = qw(a, b, c) ;
599cee73 265EXPECT
266Possible attempt to separate words with commas at - line 3.
267########
268# toke.c
e476b1b5 269use warnings 'qw' ;
599cee73 270@a = qw(a b #) ;
e476b1b5 271no warnings 'qw' ;
0453d815 272@a = qw(a b #) ;
599cee73 273EXPECT
274Possible attempt to put comments in qw() list at - line 3.
275########
276# toke.c
4438c4b7 277use warnings 'syntax' ;
599cee73 278print ("")
279EXPECT
280print (...) interpreted as function at - line 3.
281########
282# toke.c
4438c4b7 283no warnings 'syntax' ;
0453d815 284print ("")
285EXPECT
286
287########
288# toke.c
4438c4b7 289use warnings 'syntax' ;
599cee73 290printf ("")
291EXPECT
292printf (...) interpreted as function at - line 3.
293########
294# toke.c
4438c4b7 295no warnings 'syntax' ;
0453d815 296printf ("")
297EXPECT
298
299########
300# toke.c
4438c4b7 301use warnings 'syntax' ;
599cee73 302sort ("")
303EXPECT
304sort (...) interpreted as function at - line 3.
305########
306# toke.c
4438c4b7 307no warnings 'syntax' ;
0453d815 308sort ("")
309EXPECT
310
311########
312# toke.c
4438c4b7 313use warnings 'ambiguous' ;
599cee73 314$a = ${time[2]};
4438c4b7 315no warnings 'ambiguous' ;
0453d815 316$a = ${time[2]};
599cee73 317EXPECT
318Ambiguous use of ${time[...]} resolved to $time[...] at - line 3.
319########
320# toke.c
4438c4b7 321use warnings 'ambiguous' ;
599cee73 322$a = ${time{2}};
323EXPECT
324Ambiguous use of ${time{...}} resolved to $time{...} at - line 3.
325########
326# toke.c
4438c4b7 327no warnings 'ambiguous' ;
0453d815 328$a = ${time{2}};
329EXPECT
330
331########
332# toke.c
4438c4b7 333use warnings 'ambiguous' ;
599cee73 334$a = ${time} ;
4438c4b7 335no warnings 'ambiguous' ;
0453d815 336$a = ${time} ;
599cee73 337EXPECT
338Ambiguous use of ${time} resolved to $time at - line 3.
339########
340# toke.c
4438c4b7 341use warnings 'ambiguous' ;
599cee73 342sub fred {}
343$a = ${fred} ;
4438c4b7 344no warnings 'ambiguous' ;
0453d815 345$a = ${fred} ;
599cee73 346EXPECT
347Ambiguous use of ${fred} resolved to $fred at - line 4.
348########
349# toke.c
4438c4b7 350use warnings 'syntax' ;
7fd134d9 351$a = _123; print "$a\n"; #( 3 string)
352$a = 1_23; print "$a\n";
353$a = 12_3; print "$a\n";
354$a = 123_; print "$a\n"; # 6
355$a = _+123; print "$a\n"; # 7 string)
356$a = +_123; print "$a\n"; #( 8 string)
357$a = +1_23; print "$a\n";
358$a = +12_3; print "$a\n";
359$a = +123_; print "$a\n"; # 11
360$a = _-123; print "$a\n"; #(12 string)
361$a = -_123; print "$a\n"; #(13 string)
362$a = -1_23; print "$a\n";
363$a = -12_3; print "$a\n";
364$a = -123_; print "$a\n"; # 16
365$a = 123._456; print "$a\n"; # 17
366$a = 123.4_56; print "$a\n";
367$a = 123.45_6; print "$a\n";
368$a = 123.456_; print "$a\n"; # 20
369$a = +123._456; print "$a\n"; # 21
370$a = +123.4_56; print "$a\n";
371$a = +123.45_6; print "$a\n";
372$a = +123.456_; print "$a\n"; # 24
373$a = -123._456; print "$a\n"; # 25
374$a = -123.4_56; print "$a\n";
375$a = -123.45_6; print "$a\n";
376$a = -123.456_; print "$a\n"; # 28
377$a = 123.456E_12; print "$a\n"; # 29
378$a = 123.456E1_2; print "$a\n";
379$a = 123.456E12_; print "$a\n"; # 31
380$a = 123.456E_+12; print "$a\n"; # 32
381$a = 123.456E+_12; print "$a\n"; # 33
382$a = 123.456E+1_2; print "$a\n";
383$a = 123.456E+12_; print "$a\n"; # 35
384$a = 123.456E_-12; print "$a\n"; # 36
385$a = 123.456E-_12; print "$a\n"; # 37
386$a = 123.456E-1_2; print "$a\n";
387$a = 123.456E-12_; print "$a\n"; # 39
b3b48e3e 388$a = 1__23; print "$a\n"; # 40
389$a = 12.3__4; print "$a\n"; # 41
390$a = 12.34e1__2; print "$a\n"; # 42
4438c4b7 391no warnings 'syntax' ;
7fd134d9 392$a = _123; print "$a\n";
393$a = 1_23; print "$a\n";
394$a = 12_3; print "$a\n";
395$a = 123_; print "$a\n";
396$a = _+123; print "$a\n";
397$a = +_123; print "$a\n";
398$a = +1_23; print "$a\n";
399$a = +12_3; print "$a\n";
400$a = +123_; print "$a\n";
401$a = _-123; print "$a\n";
402$a = -_123; print "$a\n";
403$a = -1_23; print "$a\n";
404$a = -12_3; print "$a\n";
405$a = -123_; print "$a\n";
406$a = 123._456; print "$a\n";
407$a = 123.4_56; print "$a\n";
408$a = 123.45_6; print "$a\n";
409$a = 123.456_; print "$a\n";
410$a = +123._456; print "$a\n";
411$a = +123.4_56; print "$a\n";
412$a = +123.45_6; print "$a\n";
413$a = +123.456_; print "$a\n";
414$a = -123._456; print "$a\n";
415$a = -123.4_56; print "$a\n";
416$a = -123.45_6; print "$a\n";
417$a = -123.456_; print "$a\n";
418$a = 123.456E_12; print "$a\n";
419$a = 123.456E1_2; print "$a\n";
420$a = 123.456E12_; print "$a\n";
421$a = 123.456E_+12; print "$a\n";
422$a = 123.456E+_12; print "$a\n";
423$a = 123.456E+1_2; print "$a\n";
424$a = 123.456E+12_; print "$a\n";
425$a = 123.456E_-12; print "$a\n";
426$a = 123.456E-_12; print "$a\n";
427$a = 123.456E-1_2; print "$a\n";
428$a = 123.456E-12_; print "$a\n";
b3b48e3e 429$a = 1__23; print "$a\n";
430$a = 12.3__4; print "$a\n";
431$a = 12.34e1__2; print "$a\n";
599cee73 432EXPECT
fbfa96bd 433OPTIONS regex
928753ea 434Misplaced _ in number at - line 6.
928753ea 435Misplaced _ in number at - line 11.
7fd134d9 436Misplaced _ in number at - line 16.
928753ea 437Misplaced _ in number at - line 17.
7fd134d9 438Misplaced _ in number at - line 20.
928753ea 439Misplaced _ in number at - line 21.
7fd134d9 440Misplaced _ in number at - line 24.
441Misplaced _ in number at - line 25.
442Misplaced _ in number at - line 28.
443Misplaced _ in number at - line 29.
444Misplaced _ in number at - line 31.
445Misplaced _ in number at - line 32.
446Misplaced _ in number at - line 33.
447Misplaced _ in number at - line 35.
448Misplaced _ in number at - line 36.
449Misplaced _ in number at - line 37.
450Misplaced _ in number at - line 39.
b3b48e3e 451Misplaced _ in number at - line 40.
452Misplaced _ in number at - line 41.
453Misplaced _ in number at - line 42.
928753ea 454_123
455123
928753ea 456123
7fd134d9 457123
458123
459_123
460123
461123
462123
463-123
464-_123
465-123
466-123
467-123
468123.456
469123.456
470123.456
471123.456
472123.456
473123.456
474123.456
475123.456
476-123.456
477-123.456
478-123.456
479-123.456
480123456000000000
481123456000000000
482123456000000000
483123456000000000
484123456000000000
485123456000000000
486123456000000000
fbfa96bd 4871.23456e-0?10
4881.23456e-0?10
4891.23456e-0?10
4901.23456e-0?10
b3b48e3e 491123
49212.34
49312340000000000
7fd134d9 494_123
495123
496123
497123
498123
499_123
500123
501123
502123
503-123
504-_123
505-123
506-123
507-123
508123.456
509123.456
510123.456
511123.456
512123.456
928753ea 513123.456
514123.456
928753ea 515123.456
7fd134d9 516-123.456
517-123.456
518-123.456
519-123.456
520123456000000000
521123456000000000
522123456000000000
523123456000000000
524123456000000000
525123456000000000
526123456000000000
fbfa96bd 5271.23456e-0?10
5281.23456e-0?10
5291.23456e-0?10
5301.23456e-0?10
b3b48e3e 531123
53212.34
53312340000000000
599cee73 534########
535# toke.c
e476b1b5 536use warnings 'bareword' ;
60e6418e 537#line 25 "bar"
599cee73 538$a = FRED:: ;
e476b1b5 539no warnings 'bareword' ;
0453d815 540#line 25 "bar"
541$a = FRED:: ;
599cee73 542EXPECT
60e6418e 543Bareword "FRED::" refers to nonexistent package at bar line 25.
599cee73 544########
545# toke.c
4438c4b7 546use warnings 'ambiguous' ;
599cee73 547sub time {}
0453d815 548my $a = time() ;
4438c4b7 549no warnings 'ambiguous' ;
0453d815 550my $b = time() ;
599cee73 551EXPECT
552Ambiguous call resolved as CORE::time(), qualify as such or use & at - line 4.
553########
554# toke.c
26d16222 555use warnings ;
0453d815 556eval <<'EOE';
df0deb90 557# line 30 "foo"
558warn "yelp";
0453d815 559{
0453d815 560 $_ = " \x{123} " ;
561}
562EOE
563EXPECT
df0deb90 564yelp at foo line 30.
0453d815 565########
566# toke.c
0453d815 567my $a = rand + 4 ;
568EXPECT
569Warning: Use of "rand" without parens is ambiguous at - line 2.
570########
571# toke.c
572$^W = 0 ;
573my $a = rand + 4 ;
574{
4438c4b7 575 no warnings 'ambiguous' ;
0453d815 576 $a = rand + 4 ;
4438c4b7 577 use warnings 'ambiguous' ;
0453d815 578 $a = rand + 4 ;
579}
580$a = rand + 4 ;
581EXPECT
582Warning: Use of "rand" without parens is ambiguous at - line 3.
583Warning: Use of "rand" without parens is ambiguous at - line 8.
584Warning: Use of "rand" without parens is ambiguous at - line 10.
585########
586# toke.c
587sub fred {};
588-fred ;
589EXPECT
590Ambiguous use of -fred resolved as -&fred() at - line 3.
591########
592# toke.c
593$^W = 0 ;
594sub fred {} ;
595-fred ;
596{
4438c4b7 597 no warnings 'ambiguous' ;
0453d815 598 -fred ;
4438c4b7 599 use warnings 'ambiguous' ;
0453d815 600 -fred ;
601}
602-fred ;
603EXPECT
604Ambiguous use of -fred resolved as -&fred() at - line 4.
605Ambiguous use of -fred resolved as -&fred() at - line 9.
606Ambiguous use of -fred resolved as -&fred() at - line 11.
607########
608# toke.c
609open FOO || time;
610EXPECT
611Precedence problem: open FOO should be open(FOO) at - line 2.
612########
613# toke.c
614$^W = 0 ;
615open FOO || time;
616{
e476b1b5 617 no warnings 'precedence' ;
0453d815 618 open FOO || time;
e476b1b5 619 use warnings 'precedence' ;
0453d815 620 open FOO || time;
621}
622open FOO || time;
623EXPECT
624Precedence problem: open FOO should be open(FOO) at - line 3.
625Precedence problem: open FOO should be open(FOO) at - line 8.
626Precedence problem: open FOO should be open(FOO) at - line 10.
627########
628# toke.c
629$^W = 0 ;
630*foo *foo ;
631{
4438c4b7 632 no warnings 'ambiguous' ;
0453d815 633 *foo *foo ;
4438c4b7 634 use warnings 'ambiguous' ;
0453d815 635 *foo *foo ;
636}
637*foo *foo ;
638EXPECT
639Operator or semicolon missing before *foo at - line 3.
640Ambiguous use of * resolved as operator * at - line 3.
641Operator or semicolon missing before *foo at - line 8.
642Ambiguous use of * resolved as operator * at - line 8.
643Operator or semicolon missing before *foo at - line 10.
644Ambiguous use of * resolved as operator * at - line 10.
767a6a26 645########
646# toke.c
e476b1b5 647use warnings 'misc' ;
767a6a26 648my $a = "\m" ;
e476b1b5 649no warnings 'misc' ;
767a6a26 650$a = "\m" ;
651EXPECT
652Unrecognized escape \m passed through at - line 3.
653########
654# toke.c
655use warnings 'portable' ;
656my $a = 0b011111111111111111111111111111110 ;
657 $a = 0b011111111111111111111111111111111 ;
658 $a = 0b111111111111111111111111111111111 ;
659 $a = 0x0fffffffe ;
660 $a = 0x0ffffffff ;
661 $a = 0x1ffffffff ;
662 $a = 0037777777776 ;
663 $a = 0037777777777 ;
664 $a = 0047777777777 ;
665no warnings 'portable' ;
666 $a = 0b011111111111111111111111111111110 ;
667 $a = 0b011111111111111111111111111111111 ;
668 $a = 0b111111111111111111111111111111111 ;
669 $a = 0x0fffffffe ;
670 $a = 0x0ffffffff ;
671 $a = 0x1ffffffff ;
672 $a = 0037777777776 ;
673 $a = 0037777777777 ;
674 $a = 0047777777777 ;
675EXPECT
676Binary number > 0b11111111111111111111111111111111 non-portable at - line 5.
677Hexadecimal number > 0xffffffff non-portable at - line 8.
678Octal number > 037777777777 non-portable at - line 11.
679########
680# toke.c
681use warnings 'overflow' ;
682my $a = 0b011111111111111111111111111111110 ;
683 $a = 0b011111111111111111111111111111111 ;
15041a67 684 $a = 0b10000000000000000000000000000000000000000000000000000000000000000 ;
767a6a26 685 $a = 0x0fffffffe ;
686 $a = 0x0ffffffff ;
15041a67 687 $a = 0x10000000000000000 ;
767a6a26 688 $a = 0037777777776 ;
689 $a = 0037777777777 ;
15041a67 690 $a = 002000000000000000000000;
767a6a26 691no warnings 'overflow' ;
692 $a = 0b011111111111111111111111111111110 ;
693 $a = 0b011111111111111111111111111111111 ;
15041a67 694 $a = 0b10000000000000000000000000000000000000000000000000000000000000000 ;
767a6a26 695 $a = 0x0fffffffe ;
696 $a = 0x0ffffffff ;
15041a67 697 $a = 0x10000000000000000 ;
767a6a26 698 $a = 0037777777776 ;
699 $a = 0037777777777 ;
15041a67 700 $a = 002000000000000000000000;
767a6a26 701EXPECT
702Integer overflow in binary number at - line 5.
703Integer overflow in hexadecimal number at - line 8.
704Integer overflow in octal number at - line 11.
8593bda5 705########
706# toke.c
ac206dc8 707BEGIN { $^C = 1; }
708use warnings 'misc';
709dump;
710CORE::dump;
711EXPECT
712dump() better written as CORE::dump() at - line 4.
713- syntax OK
714########
715# toke.c
716use warnings 'misc';
717use subs qw/dump/;
718sub dump { print "no warning for overriden dump\n"; }
719dump;
720EXPECT
721no warning for overriden dump
722########
723# toke.c
8593bda5 724use warnings 'ambiguous';
725"@mjd_previously_unused_array";
726no warnings 'ambiguous';
727"@mjd_previously_unused_array";
728EXPECT
729Possible unintended interpolation of @mjd_previously_unused_array in string at - line 3.
707afd92 730########
731# toke.c
732# The \q should warn, the \_ should NOT warn.
733use warnings 'misc';
734"foo" =~ /\q/;
735"bar" =~ /\_/;
736no warnings 'misc';
737"foo" =~ /\q/;
738"bar" =~ /\_/;
739EXPECT
740Unrecognized escape \q passed through at - line 4.