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 'deprecated' ;
23 Use of EQ is deprecated at - line 8.
26 # Check compile time scope of pragma
29 use warnings 'deprecated' ;
34 Use of EQ is deprecated 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 'deprecated' ;
73 Use of EQ is deprecated at - line 3.
80 use warnings 'deprecated' ;
87 use warnings 'deprecated' ;
97 use warnings 'deprecated' ;
101 use warnings 'uninitialized' ;
105 Use of EQ is deprecated at ./abc line 2.
106 Use of uninitialized value in scalar chop at - line 3.
110 use warnings 'deprecated' ;
114 use warnings 'uninitialized' ;
118 Use of EQ is deprecated at abc.pm line 2.
119 Use of uninitialized value in scalar chop at - line 3.
122 # Check scope of pragma with eval
132 # Check scope of pragma with eval
135 use warnings 'uninitialized' ;
140 Use of uninitialized value in scalar chop at - line 6.
143 # Check scope of pragma with eval
144 use warnings 'uninitialized' ;
150 Use of uninitialized value in scalar chop at - line 5.
151 Use of uninitialized value in scalar chop at - line 7.
154 # Check scope of pragma with eval
155 use warnings 'uninitialized' ;
162 Use of uninitialized value in scalar chop at - line 8.
165 # Check scope of pragma with eval
175 # Check scope of pragma with eval
178 use warnings 'deprecated' ;
183 Use of EQ is deprecated at - line 6.
186 # Check scope of pragma with eval
187 use warnings 'deprecated' ;
193 Use of EQ is deprecated at - line 5.
194 Use of EQ is deprecated at - line 7.
197 # Check scope of pragma with eval
198 use warnings 'deprecated' ;
205 Use of EQ is deprecated at - line 8.
208 # Check scope of pragma with eval
218 # Check scope of pragma with eval
221 use warnings 'uninitialized' ;
226 Use of uninitialized value in scalar chop at (eval 1) line 3.
229 # Check scope of pragma with eval
230 use warnings 'uninitialized' ;
236 Use of uninitialized value in scalar chop at (eval 1) line 2.
237 Use of uninitialized value in scalar chop at - line 7.
240 # Check scope of pragma with eval
241 use warnings 'uninitialized' ;
248 Use of uninitialized value in scalar chop at - line 8.
251 # Check scope of pragma with eval
261 # Check scope of pragma with eval
264 use warnings 'deprecated' ;
269 Use of EQ is deprecated at (eval 1) line 3.
272 # Check scope of pragma with eval
273 use warnings 'deprecated' ;
279 Use of EQ is deprecated at - line 7.
280 Use of EQ is deprecated at (eval 1) line 2.
283 # Check scope of pragma with eval
284 use warnings 'deprecated' ;
291 Use of EQ is deprecated at - line 8.
294 # Check the additive nature of the pragma
297 use warnings 'deprecated' ;
300 use warnings 'uninitialized' ;
302 no warnings 'deprecated' ;
305 Use of EQ is deprecated at - line 6.
306 Use of uninitialized value in scalar chop at - line 9.
307 Use of uninitialized value in string eq at - line 11.
308 Use of uninitialized value in string eq at - line 11.