1 Check lexical warnings functionality
4 check that the warning hierarchy works.
8 # ignore unknown warning categories
9 use warnings 'this-should-never-be-a-warning-category' ;
13 # Check compile time scope of pragma
14 use warnings 'deprecated' ;
21 Use of EQ is deprecated at - line 8.
24 # Check compile time scope of pragma
27 use warnings 'deprecated' ;
32 Use of EQ is deprecated at - line 6.
35 # Check runtime scope of pragma
36 use warnings 'uninitialized' ;
43 Use of uninitialized value in scalar chop at - line 8.
46 # Check runtime scope of pragma
49 use warnings 'uninitialized' ;
54 Use of uninitialized value in scalar chop at - line 6.
57 # Check runtime scope of pragma
60 use warnings 'uninitialized' ;
61 $a = sub { my $b ; chop $b ; }
65 Use of uninitialized value in scalar chop at - line 6.
68 use warnings 'deprecated' ;
71 Use of EQ is deprecated at - line 3.
78 use warnings 'deprecated' ;
85 use warnings 'deprecated' ;
95 use warnings 'deprecated' ;
99 use warnings 'uninitialized' ;
103 Use of EQ is deprecated at ./abc line 2.
104 Use of uninitialized value in scalar chop at - line 3.
108 use warnings 'deprecated' ;
112 use warnings 'uninitialized' ;
116 Use of EQ is deprecated at abc.pm line 2.
117 Use of uninitialized value in scalar chop at - line 3.
120 # Check scope of pragma with eval
130 # Check scope of pragma with eval
133 use warnings 'uninitialized' ;
138 Use of uninitialized value in scalar chop at - line 6.
141 # Check scope of pragma with eval
142 use warnings 'uninitialized' ;
148 Use of uninitialized value in scalar chop at - line 5.
149 Use of uninitialized value in scalar chop at - line 7.
152 # Check scope of pragma with eval
153 use warnings 'uninitialized' ;
160 Use of uninitialized value in scalar chop at - line 8.
163 # Check scope of pragma with eval
173 # Check scope of pragma with eval
176 use warnings 'deprecated' ;
181 Use of EQ is deprecated at - line 6.
184 # Check scope of pragma with eval
185 use warnings 'deprecated' ;
191 Use of EQ is deprecated at - line 5.
192 Use of EQ is deprecated at - line 7.
195 # Check scope of pragma with eval
196 use warnings 'deprecated' ;
203 Use of EQ is deprecated at - line 8.
206 # Check scope of pragma with eval
216 # Check scope of pragma with eval
219 use warnings 'uninitialized' ;
224 Use of uninitialized value in scalar chop at (eval 1) line 3.
227 # Check scope of pragma with eval
228 use warnings 'uninitialized' ;
234 Use of uninitialized value in scalar chop at (eval 1) line 2.
235 Use of uninitialized value in scalar chop at - line 7.
238 # Check scope of pragma with eval
239 use warnings 'uninitialized' ;
246 Use of uninitialized value in scalar chop at - line 8.
249 # Check scope of pragma with eval
259 # Check scope of pragma with eval
262 use warnings 'deprecated' ;
267 Use of EQ is deprecated at (eval 1) line 3.
270 # Check scope of pragma with eval
271 use warnings 'deprecated' ;
277 Use of EQ is deprecated at - line 7.
278 Use of EQ is deprecated at (eval 1) line 2.
281 # Check scope of pragma with eval
282 use warnings 'deprecated' ;
289 Use of EQ is deprecated at - line 8.
292 # Check the additive nature of the pragma
295 use warnings 'deprecated' ;
298 use warnings 'uninitialized' ;
300 no warnings 'deprecated' ;
303 Use of EQ is deprecated at - line 6.
304 Use of uninitialized value in scalar chop at - line 9.
305 Use of uninitialized value in string eq at - line 11.
306 Use of uninitialized value in string eq at - line 11.