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 "Fred" not allowed while "strict subs" in use at - line 4.
40 Execution of - aborted due to compilation errors.
43 # strict subs - no error
51 # Check compile time scope of strict subs pragma
59 Bareword "Fred" not allowed while "strict subs" in use at - line 8.
60 Execution of - aborted due to compilation errors.
63 # Check compile time scope of strict subs pragma
71 Bareword "Fred" not allowed while "strict subs" in use at - line 6.
72 Execution of - aborted due to compilation errors.
75 # Check compile time scope of strict vars pragma
83 Variable "$joe" is not imported at - line 8.
84 Global symbol "joe" requires explicit package name at - line 8.
85 Execution of - aborted due to compilation errors.
88 # Check compile time scope of strict vars pragma
96 Global symbol "joe" requires explicit package name at - line 6.
97 Execution of - aborted due to compilation errors.
100 # Check runtime scope of strict refs pragma
110 Can't use string ("fred") as a SCALAR ref while "strict refs" in use at - line 10.
113 # Check runtime scope of strict refs pragma
123 Can't use string ("fred") as a SCALAR ref while "strict refs" in use at - line 8.
126 # Check runtime scope of strict refs pragma
132 $a = sub { my $c = $$b ; }
136 Can't use string ("fred") as a SCALAR ref while "strict refs" in use at - line 8.
142 Bareword "Fred" not allowed while "strict subs" in use at - line 3.
143 Execution of - aborted due to compilation errors.
174 Bareword "Fred" not allowed while "strict subs" in use at ./abc line 2.
175 Compilation failed in require at - line 2.
186 Bareword "Fred" not allowed while "strict subs" in use at abc.pm line 2.
187 Compilation failed in require at - line 2.
188 BEGIN failed--compilation aborted at - line 2.
191 # Check scope of pragma with eval
202 # Check scope of pragma with eval
211 Bareword "Fred" not allowed while "strict subs" in use at - line 6.
212 Execution of - aborted due to compilation errors.
215 # Check scope of pragma with eval
223 Bareword "Fred" not allowed while "strict subs" in use at - line 5.
224 Bareword "Fred" not allowed while "strict subs" in use at - line 8.
225 Execution of - aborted due to compilation errors.
228 # Check scope of pragma with eval
237 Bareword "Fred" not allowed while "strict subs" in use at - line 9.
238 Execution of - aborted due to compilation errors.
241 # Check scope of pragma with eval
251 # Check scope of pragma with eval
258 Bareword "Fred" not allowed while "strict subs" in use at (eval 1) line 3.
261 # Check scope of pragma with eval
267 Bareword "Fred" not allowed while "strict subs" in use at (eval 1) line 2.
270 # Check scope of pragma with eval
278 Bareword "Fred" not allowed while "strict subs" in use at - line 8.
279 Execution of - aborted due to compilation errors.