1 Check strict subs functionality
5 # no strict, should build & run ok.
14 use strict qw(refs vars);
31 Bareword "Fred" not allowed while "strict subs" in use at - line 4.
32 Execution of - aborted due to compilation errors.
39 Bareword "Z" not allowed while "strict subs" in use at - line 4.
40 Bareword "A" not allowed while "strict subs" in use at - line 4.
41 Execution of - aborted due to compilation errors.
48 Bareword "Y" not allowed while "strict subs" in use at - line 4.
49 Bareword "B" not allowed while "strict subs" in use at - line 4.
50 Execution of - aborted due to compilation errors.
57 Bareword "Fred" not allowed while "strict subs" in use at - line 4.
58 Execution of - aborted due to compilation errors.
61 # strict subs - no error
69 # Check compile time scope of strict subs pragma
77 Bareword "Fred" not allowed while "strict subs" in use at - line 8.
78 Execution of - aborted due to compilation errors.
81 # Check compile time scope of strict subs pragma
89 Bareword "Fred" not allowed while "strict subs" in use at - line 6.
90 Execution of - aborted due to compilation errors.
93 # Check compile time scope of strict vars pragma
101 Variable "$joe" is not imported at - line 8.
102 Global symbol "$joe" requires explicit package name at - line 8.
103 Execution of - aborted due to compilation errors.
106 # Check compile time scope of strict vars pragma
114 Global symbol "$joe" requires explicit package name at - line 6.
115 Execution of - aborted due to compilation errors.
118 # Check runtime scope of strict refs pragma
128 Can't use string ("fred") as a SCALAR ref while "strict refs" in use at - line 10.
131 # Check runtime scope of strict refs pragma
141 Can't use string ("fred") as a SCALAR ref while "strict refs" in use at - line 8.
144 # Check runtime scope of strict refs pragma
150 $a = sub { my $c = $$b ; }
154 Can't use string ("fred") as a SCALAR ref while "strict refs" in use at - line 8.
160 Bareword "Fred" not allowed while "strict subs" in use at - line 3.
161 Execution of - aborted due to compilation errors.
192 Bareword "Fred" not allowed while "strict subs" in use at ./abc line 2.
193 Compilation failed in require at - line 2.
204 Bareword "Fred" not allowed while "strict subs" in use at abc.pm line 2.
205 Compilation failed in require at - line 2.
206 BEGIN failed--compilation aborted at - line 2.
209 # Check scope of pragma with eval
220 # Check scope of pragma with eval
229 Bareword "Fred" not allowed while "strict subs" in use at - line 6.
230 Execution of - aborted due to compilation errors.
233 # Check scope of pragma with eval
241 Bareword "Fred" not allowed while "strict subs" in use at - line 5.
242 Bareword "Fred" not allowed while "strict subs" in use at - line 8.
243 Execution of - aborted due to compilation errors.
246 # Check scope of pragma with eval
255 Bareword "Fred" not allowed while "strict subs" in use at - line 9.
256 Execution of - aborted due to compilation errors.
259 # Check scope of pragma with eval
269 # Check scope of pragma with eval
276 Bareword "Fred" not allowed while "strict subs" in use at (eval 1) line 3.
279 # Check scope of pragma with eval
285 Bareword "Fred" not allowed while "strict subs" in use at (eval 1) line 2.
288 # Check scope of pragma with eval
296 Bareword "Fred" not allowed while "strict subs" in use at - line 8.
297 Execution of - aborted due to compilation errors.
300 # see if Foo->Bar(...) etc work under strictures
302 package Foo; sub Bar { print "@_\n" }