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.
30 "A::Really::Big::Package::Name::To::Use" =~ /(.*)/;
33 Can't use string ("A::Really::Big::Package::Name::T"...) as a SCALAR ref while "strict refs" in use at - line 5.
38 *{"A::Really::Big::Package::Name::To::Use"; }
40 Can't use string ("A::Really::Big::Package::Name::T"...) as a symbol ref while "strict refs" in use at - line 4.
45 "A::Really::Big::Package::Name::To::Use" =~ /(.*)/;
48 Can't use string ("A::Really::Big::Package::Name::T"...) as a symbol ref while "strict refs" in use at - line 5.
56 Can't use string ("fred") as a SCALAR ref while "strict refs" in use at - line 5.
64 Can't use string ("fred") as a SCALAR ref while "strict refs" in use at - line 5.
73 Can't use string ("fred") as a SCALAR ref while "strict refs" in use at - line 6.
81 Can't use an undefined value as a SCALAR reference at - line 5.
89 Can't use an undefined value as an ARRAY reference at - line 5.
97 Can't use an undefined value as a HASH reference at - line 5.
100 # strict refs - error
105 Can't use an undefined value as a symbol reference at - line 5.
108 # strict refs - error
112 Can't use bareword ("fred") as an ARRAY ref while "strict refs" in use at - line 4.
115 # strict refs - error
117 my $a = fred->{barney} ;
119 Can't use bareword ("fred") as a HASH ref while "strict refs" in use at - line 4.
122 # strict refs - no error
133 # strict refs - no error
134 use strict qw(subs vars) ;
143 # strict refs - no error
152 # strict refs - no error
161 # Check runtime scope of strict refs pragma
171 Can't use string ("fred") as a SCALAR ref while "strict refs" in use at - line 10.
174 # Check runtime scope of strict refs pragma
184 Can't use string ("fred") as a SCALAR ref while "strict refs" in use at - line 8.
187 # Check runtime scope of strict refs pragma
193 $a = sub { my $c = $$b ; }
197 Can't use string ("fred") as a SCALAR ref while "strict refs" in use at - line 8.
229 Can't use string ("Fred") as a SCALAR ref while "strict refs" in use at ./abc line 2.
230 Compilation failed in require at - line 2.
241 Can't use string ("Fred") as a SCALAR ref while "strict refs" in use at abc.pm line 2.
242 Compilation failed in require at - line 2.
243 BEGIN failed--compilation aborted at - line 2.
246 # Check scope of pragma with eval
257 # Check scope of pragma with eval
266 Can't use string ("Fred") as a SCALAR ref while "strict refs" in use at - line 6.
269 # Check scope of pragma with eval
276 Can't use string ("Fred") as a SCALAR ref while "strict refs" in use at - line 5.
279 # Check scope of pragma with eval
288 Can't use string ("Fred") as a SCALAR ref while "strict refs" in use at - line 9.
291 # Check scope of pragma with eval
301 # Check scope of pragma with eval
308 Can't use string ("Fred") as a SCALAR ref while "strict refs" in use at (eval 1) line 3.
311 # Check scope of pragma with eval
317 Can't use string ("Fred") as a SCALAR ref while "strict refs" in use at (eval 1) line 2.
320 # Check scope of pragma with eval
328 Can't use string ("Fred") as a SCALAR ref while "strict refs" in use at - line 8.
330 # [perl #26910] hints not propagated into (?{...})
334 Can't use string ("foo") as a SCALAR ref while "strict refs" in use at - line 3.
336 # [perl #37886] strict 'refs' doesn't apply inside defined
341 Can't use string ("foo") as a SCALAR ref while "strict refs" in use at - line 4.
343 # [perl #74168] Assertion failed: (SvTYPE(_svcur) >= SVt_PV), function Perl_softref2xv, file pp.c, line 240.
345 my $o = 1 ; $o->{1} ;
347 Can't use string ("1") as a HASH ref while "strict refs" in use at - line 3.
349 # pp_hot.c [pp_entersub]
352 use open qw( :utf8 :std );
355 Can't use string ("F") as a subroutine ref while "strict refs" in use at - line 5.