X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Flib%2Fstrict%2Fsubs;h=4f0e6215f717bb1665567ae71eaa4c4a8e57eb2e;hb=35d904946636411814f392bec019cad90a357c0a;hp=4516de7be34838dd24999dba834bbefd35054f1f;hpb=3b9d212931c328bf8f0ad8c51694e8b569ec046e;p=p5sagit%2Fp5-mst-13.2.git diff --git a/t/lib/strict/subs b/t/lib/strict/subs index 4516de7..4f0e621 100644 --- a/t/lib/strict/subs +++ b/t/lib/strict/subs @@ -361,3 +361,22 @@ print 1..1, bad; EXPECT Bareword "bad" not allowed while "strict subs" in use at - line 3. Execution of - aborted due to compilation errors. +######## +eval q{ use strict; no strict refs; }; +print $@; +EXPECT +Bareword "refs" not allowed while "strict subs" in use at (eval 1) line 1. +######## +# [perl #25147] +use strict; +print "" if BAREWORD; +EXPECT +Bareword "BAREWORD" not allowed while "strict subs" in use at - line 3. +Execution of - aborted due to compilation errors. +######## +# [perl #26910] hints not propagated into (?{...}) +use strict 'subs'; +qr/(?{my $x=foo})/; +EXPECT +Bareword "foo" not allowed while "strict subs" in use at (re_eval 1) line 1. +Compilation failed in regexp at - line 3.