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 $b in scalar chop at - line 8.
48 # Check runtime scope of pragma
51 use warnings 'uninitialized' ;
56 Use of uninitialized value $b 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 $b in scalar chop at - line 6.
70 use warnings 'syntax' ;
73 Reversed += operator at - line 3.
76 no warnings 'reserved' ;
79 Useless use of concatenation (.) or string in void context at - line 3.
86 use warnings 'syntax' ;
93 use warnings 'syntax' ;
103 use warnings 'syntax' ;
107 use warnings 'uninitialized' ;
111 Reversed += operator at ./abc line 2.
112 Use of uninitialized value $a in scalar chop at - line 3.
116 use warnings 'syntax' ;
120 use warnings 'uninitialized' ;
124 Reversed += operator at abc.pm line 2.
125 Use of uninitialized value $a in scalar chop at - line 3.
128 # Check scope of pragma with eval
141 # Check scope of pragma with eval
146 use warnings 'uninitialized' ;
152 Use of uninitialized value $b in scalar chop at - line 8.
155 # Check scope of pragma with eval
158 use warnings 'uninitialized' ;
165 Use of uninitialized value $b in scalar chop at - line 7.
166 Use of uninitialized value $b in scalar chop at - line 9.
169 # Check scope of pragma with eval
172 use warnings 'uninitialized' ;
180 Use of uninitialized value $b in scalar chop at - line 10.
183 # Check scope of pragma with eval
196 # Check scope of pragma with eval
201 use warnings 'syntax' ;
207 Reversed += operator at - line 8.
210 # Check scope of pragma with eval
213 use warnings 'syntax' ;
220 Reversed += operator at - line 7.
221 Reversed += operator at - line 9.
224 # Check scope of pragma with eval
227 use warnings 'syntax' ;
235 Reversed += operator at - line 10.
238 # Check scope of pragma with eval
251 # Check scope of pragma with eval
256 use warnings 'uninitialized' ;
262 Use of uninitialized value $b in scalar chop at (eval 1) line 3.
265 # Check scope of pragma with eval
268 use warnings 'uninitialized' ;
275 Use of uninitialized value $b in scalar chop at (eval 1) line 2.
276 Use of uninitialized value $b in scalar chop at - line 9.
279 # Check scope of pragma with eval
282 use warnings 'uninitialized' ;
290 Use of uninitialized value $b in scalar chop at - line 10.
293 # Check scope of pragma with eval
306 # Check scope of pragma with eval
311 use warnings 'syntax' ;
317 Reversed += operator at (eval 1) line 3.
320 # Check scope of pragma with eval
323 use warnings 'syntax' ;
330 Reversed += operator at - line 9.
331 Reversed += operator at (eval 1) line 2.
334 # Check scope of pragma with eval
337 use warnings 'syntax' ;
345 Reversed += operator at - line 10.
348 # Check the additive nature of the pragma
351 use warnings 'syntax' ;
354 use warnings 'uninitialized' ;
356 no warnings 'syntax' ;
359 Reversed += operator at - line 6.
360 Use of uninitialized value $c in scalar chop at - line 9.