1 Check lexical warnings functionality
4 check that the warning hierarchy works.
8 # check illegal category is caught
9 use warnings 'this-should-never-be-a-warning-category' ;
11 unknown warnings category 'this-should-never-be-a-warning-category' at - line 3
12 BEGIN failed--compilation aborted at - line 3.
15 # Check compile time scope of pragma
16 use warnings 'syntax' ;
23 Reversed += operator at - line 8.
26 # Check compile time scope of pragma
29 use warnings 'syntax' ;
34 Reversed += operator at - line 6.
37 # Check runtime scope of pragma
38 use warnings 'uninitialized' ;
45 Use of uninitialized value in scalar chop at - line 8.
48 # Check runtime scope of pragma
51 use warnings 'uninitialized' ;
56 Use of uninitialized value in scalar chop at - line 6.
59 # Check runtime scope of pragma
62 use warnings 'uninitialized' ;
63 $a = sub { my $b ; chop $b ; }
67 Use of uninitialized value in scalar chop at - line 6.
70 use warnings 'syntax' ;
73 Reversed += operator at - line 3.
80 use warnings 'syntax' ;
87 use warnings 'syntax' ;
97 use warnings 'syntax' ;
101 use warnings 'uninitialized' ;
105 Reversed += operator at ./abc line 2.
106 Use of uninitialized value in scalar chop at - line 3.
110 use warnings 'syntax' ;
114 use warnings 'uninitialized' ;
118 Reversed += operator at abc.pm line 2.
119 Use of uninitialized value in scalar chop at - line 3.
122 # Check scope of pragma with eval
135 # Check scope of pragma with eval
140 use warnings 'uninitialized' ;
146 Use of uninitialized value in scalar chop at - line 8.
149 # Check scope of pragma with eval
152 use warnings 'uninitialized' ;
159 Use of uninitialized value in scalar chop at - line 7.
160 Use of uninitialized value in scalar chop at - line 9.
163 # Check scope of pragma with eval
166 use warnings 'uninitialized' ;
174 Use of uninitialized value in scalar chop at - line 10.
177 # Check scope of pragma with eval
190 # Check scope of pragma with eval
195 use warnings 'syntax' ;
201 Reversed += operator at - line 8.
204 # Check scope of pragma with eval
207 use warnings 'syntax' ;
214 Reversed += operator at - line 7.
215 Reversed += operator at - line 9.
218 # Check scope of pragma with eval
221 use warnings 'syntax' ;
229 Reversed += operator at - line 10.
232 # Check scope of pragma with eval
245 # Check scope of pragma with eval
250 use warnings 'uninitialized' ;
256 Use of uninitialized value in scalar chop at (eval 1) line 3.
259 # Check scope of pragma with eval
262 use warnings 'uninitialized' ;
269 Use of uninitialized value in scalar chop at (eval 1) line 2.
270 Use of uninitialized value in scalar chop at - line 9.
273 # Check scope of pragma with eval
276 use warnings 'uninitialized' ;
284 Use of uninitialized value in scalar chop at - line 10.
287 # Check scope of pragma with eval
300 # Check scope of pragma with eval
305 use warnings 'syntax' ;
311 Reversed += operator at (eval 1) line 3.
314 # Check scope of pragma with eval
317 use warnings 'syntax' ;
324 Reversed += operator at - line 9.
325 Reversed += operator at (eval 1) line 2.
328 # Check scope of pragma with eval
331 use warnings 'syntax' ;
339 Reversed += operator at - line 10.
342 # Check the additive nature of the pragma
345 use warnings 'syntax' ;
348 use warnings 'uninitialized' ;
350 no warnings 'syntax' ;
353 Reversed += operator at - line 6.
354 Use of uninitialized value in scalar chop at - line 9.