1 Check strict refs functionality
5 # no strict, should build & run ok.
22 my $str="A::Really::Big::Package::Name::To::Use";
25 Can't use string ("A::Really::Big::Package::Name::T"...) as a HASH ref while "strict refs" in use at - line 5.
33 Can't use string ("fred") as a SCALAR ref while "strict refs" in use at - line 5.
41 Can't use string ("fred") as a SCALAR ref while "strict refs" in use at - line 5.
50 Can't use string ("fred") as a SCALAR ref while "strict refs" in use at - line 6.
58 Can't use an undefined value as a SCALAR reference at - line 5.
66 Can't use an undefined value as an ARRAY reference at - line 5.
74 Can't use an undefined value as a HASH reference at - line 5.
82 Can't use an undefined value as a symbol reference at - line 5.
89 Can't use bareword ("fred") as an ARRAY ref while "strict refs" in use at - line 4.
94 my $a = fred->{barney} ;
96 Can't use bareword ("fred") as a HASH ref while "strict refs" in use at - line 4.
99 # strict refs - no error
110 # strict refs - no error
111 use strict qw(subs vars) ;
120 # strict refs - no error
129 # strict refs - no error
138 # Check runtime scope of strict refs pragma
148 Can't use string ("fred") as a SCALAR ref while "strict refs" in use at - line 10.
151 # Check runtime scope of strict refs pragma
161 Can't use string ("fred") as a SCALAR ref while "strict refs" in use at - line 8.
164 # Check runtime scope of strict refs pragma
170 $a = sub { my $c = $$b ; }
174 Can't use string ("fred") as a SCALAR ref while "strict refs" in use at - line 8.
206 Can't use string ("Fred") as a SCALAR ref while "strict refs" in use at ./abc line 2.
207 Compilation failed in require at - line 2.
218 Can't use string ("Fred") as a SCALAR ref while "strict refs" in use at abc.pm line 2.
219 Compilation failed in require at - line 2.
220 BEGIN failed--compilation aborted at - line 2.
223 # Check scope of pragma with eval
234 # Check scope of pragma with eval
243 Can't use string ("Fred") as a SCALAR ref while "strict refs" in use at - line 6.
246 # Check scope of pragma with eval
253 Can't use string ("Fred") as a SCALAR ref while "strict refs" in use at - line 5.
256 # Check scope of pragma with eval
265 Can't use string ("Fred") as a SCALAR ref while "strict refs" in use at - line 9.
268 # Check scope of pragma with eval
278 # Check scope of pragma with eval
285 Can't use string ("Fred") as a SCALAR ref while "strict refs" in use at (eval 1) line 3.
288 # Check scope of pragma with eval
294 Can't use string ("Fred") as a SCALAR ref while "strict refs" in use at (eval 1) line 2.
297 # Check scope of pragma with eval
305 Can't use string ("Fred") as a SCALAR ref while "strict refs" in use at - line 8.
307 # [perl #26910] hints not propagated into (?{...})
311 Can't use string ("foo") as a SCALAR ref while "strict refs" in use at (re_eval 1) line 1.
313 # [perl #37886] strict 'refs' doesn't apply inside defined
318 Can't use string ("foo") as a SCALAR ref while "strict refs" in use at - line 4.
320 # [perl #37886] strict 'refs' doesn't apply inside defined
325 defined(@array) is deprecated at - line 4.
326 (Maybe you should just omit the defined()?)
327 Can't use string ("foo") as an ARRAY ref while "strict refs" in use at - line 4.
329 # [perl #37886] strict 'refs' doesn't apply inside defined
334 defined(%hash) is deprecated at - line 4.
335 (Maybe you should just omit the defined()?)
336 Can't use string ("foo") as a HASH ref while "strict refs" in use at - line 4.
338 # [perl #74168] Assertion failed: (SvTYPE(_svcur) >= SVt_PV), function Perl_softref2xv, file pp.c, line 240.
340 my $o = 1 ; $o->{1} ;
342 Can't use string ("1") as a HASH ref while "strict refs" in use at - line 3.
344 # pp_hot.c [pp_entersub]
347 use open qw( :utf8 :std );
350 Can't use string ("F") as a subroutine ref while "strict refs" in use at - line 5.