Commit | Line | Data |
599cee73 |
1 | perl.c AOK |
2 | |
3 | gv_check(defstash) |
4 | Name \"%s::%s\" used only once: possible typo |
5 | |
0453d815 |
6 | Mandatory Warnings All TODO |
7 | ------------------ |
8 | Recompile perl with -DDEBUGGING to use -D switch [moreswitches] |
9 | Unbalanced scopes: %ld more ENTERs than LEAVEs [perl_destruct] |
10 | Unbalanced saves: %ld more saves than restores [perl_destruct] |
11 | Unbalanced tmps: %ld more allocs than frees [perl_destruct] |
12 | Unbalanced context: %ld more PUSHes than POPs [perl_destruct] |
13 | Unbalanced string table refcount: (%d) for \"%s\" [perl_destruct] |
14 | Scalars leaked: %ld [perl_destruct] |
15 | |
599cee73 |
16 | |
17 | __END__ |
18 | # perl.c |
4438c4b7 |
19 | no warnings 'once' ; |
0453d815 |
20 | $x = 3 ; |
4438c4b7 |
21 | use warnings 'once' ; |
0453d815 |
22 | $z = 3 ; |
23 | EXPECT |
24 | Name "main::z" used only once: possible typo at - line 5. |
25 | ######## |
26 | -w |
27 | # perl.c |
599cee73 |
28 | $x = 3 ; |
4438c4b7 |
29 | no warnings 'once' ; |
0453d815 |
30 | $z = 3 |
599cee73 |
31 | EXPECT |
32 | Name "main::x" used only once: possible typo at - line 3. |
0453d815 |
33 | ######## |
34 | # perl.c |
35 | BEGIN { $^W =1 ; } |
36 | $x = 3 ; |
4438c4b7 |
37 | no warnings 'once' ; |
0453d815 |
38 | $z = 3 |
39 | EXPECT |
40 | Name "main::x" used only once: possible typo at - line 3. |
41 | ######## |
42 | -W |
43 | # perl.c |
4438c4b7 |
44 | no warnings 'once' ; |
0453d815 |
45 | $x = 3 ; |
4438c4b7 |
46 | use warnings 'once' ; |
0453d815 |
47 | $z = 3 ; |
48 | EXPECT |
0453d815 |
49 | Name "main::z" used only once: possible typo at - line 6. |
a6fe520e |
50 | Name "main::x" used only once: possible typo at - line 4. |
0453d815 |
51 | ######## |
52 | -X |
53 | # perl.c |
4438c4b7 |
54 | use warnings 'once' ; |
0453d815 |
55 | $x = 3 ; |
56 | EXPECT |
7272584d |
57 | ######## |
0453d815 |
58 | |
7272584d |
59 | # perl.c |
60 | { use warnings 'once' ; $x = 3 ; } |
61 | $y = 3 ; |
62 | EXPECT |
63 | Name "main::x" used only once: possible typo at - line 3. |
64 | ######## |
65 | |
66 | # perl.c |
67 | $z = 3 ; |
68 | BEGIN { $^W = 1 } |
69 | { no warnings 'once' ; $x = 3 ; } |
70 | $y = 3 ; |
71 | EXPECT |
72 | Name "main::y" used only once: possible typo at - line 6. |