Commit | Line | Data |
599cee73 |
1 | pp_hot.c AOK |
2 | |
3 | Filehandle %s never opened |
4 | $f = $a = "abc" ; print $f $a |
5 | |
6 | Filehandle %s opened only for input |
7 | print STDIN "abc" ; |
8 | |
9 | |
10 | print on closed filehandle %s |
11 | close STDIN ; print STDIN "abc" ; |
12 | |
13 | uninitialized |
14 | my $a = undef ; my @b = @$a |
15 | |
16 | uninitialized |
17 | my $a = undef ; my %b = %$a |
18 | |
19 | Odd number of elements in hash list |
20 | %X = (1,2,3) ; |
21 | |
22 | Reference found where even-sized list expected |
23 | $X = [ 1 ..3 ]; |
24 | |
25 | Read on closed filehandle <%s> |
26 | close STDIN ; $a = <STDIN>; |
27 | |
28 | Deep recursion on subroutine \"%s\" |
29 | sub fred { fred() if $a++ < 200} fred() |
30 | |
31 | Deep recursion on anonymous subroutine |
32 | $a = sub { &$a if $a++ < 200} &$a |
33 | |
34 | __END__ |
35 | # pp_hot.c |
36 | use warning 'unopened' ; |
37 | $f = $a = "abc" ; |
38 | print $f $a |
39 | EXPECT |
40 | Filehandle main::abc never opened at - line 4. |
41 | ######## |
42 | # pp_hot.c |
43 | use warning 'io' ; |
44 | print STDIN "anc"; |
45 | EXPECT |
46 | Filehandle main::STDIN opened only for input at - line 3. |
47 | ######## |
48 | # pp_hot.c |
49 | use warning 'closed' ; |
50 | close STDIN ; |
51 | print STDIN "anc"; |
52 | EXPECT |
53 | print on closed filehandle main::STDIN at - line 4. |
54 | ######## |
55 | # pp_hot.c |
56 | use warning 'uninitialized' ; |
57 | my $a = undef ; |
58 | my @b = @$a |
59 | EXPECT |
60 | Use of uninitialized value at - line 4. |
61 | ######## |
62 | # pp_hot.c |
63 | use warning 'uninitialized' ; |
64 | my $a = undef ; |
65 | my %b = %$a |
66 | EXPECT |
67 | Use of uninitialized value at - line 4. |
68 | ######## |
69 | # pp_hot.c |
70 | use warning 'unsafe' ; |
71 | my %X ; %X = (1,2,3) ; |
72 | EXPECT |
73 | Odd number of elements in hash assignment at - line 3. |
74 | ######## |
75 | # pp_hot.c |
76 | use warning 'unsafe' ; |
77 | my %X ; %X = [1 .. 3] ; |
78 | EXPECT |
79 | Reference found where even-sized list expected at - line 3. |
80 | ######## |
81 | # pp_hot.c |
82 | use warning 'closed' ; |
83 | close STDIN ; $a = <STDIN> ; |
84 | EXPECT |
85 | Read on closed filehandle <STDIN> at - line 3. |
86 | ######## |
87 | # pp_hot.c |
88 | use warning 'recursion' ; |
89 | sub fred |
90 | { |
91 | fred() if $a++ < 200 |
92 | } |
93 | |
94 | fred() |
95 | EXPECT |
96 | Deep recursion on subroutine "main::fred" at - line 5. |
97 | ######## |
98 | # pp_hot.c |
99 | use warning 'recursion' ; |
100 | $b = sub |
101 | { |
102 | &$b if $a++ < 200 |
103 | } ; |
104 | |
105 | &$b ; |
106 | EXPECT |
107 | Deep recursion on anonymous subroutine at - line 5. |