X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Flib%2Fstrict%2Fsubs;h=4f0e6215f717bb1665567ae71eaa4c4a8e57eb2e;hb=35d904946636411814f392bec019cad90a357c0a;hp=4a90809020fcb32305b67676cdc694c253ef2db0;hpb=2bc6235c05b89ccf6657edc09a1d622eb191a37e;p=p5sagit%2Fp5-mst-13.2.git diff --git a/t/lib/strict/subs b/t/lib/strict/subs index 4a90809..4f0e621 100644 --- a/t/lib/strict/subs +++ b/t/lib/strict/subs @@ -345,3 +345,38 @@ print "$abc\n"; EXPECT Bareword "XYZ" not allowed while "strict subs" in use at - line 5. Execution of - aborted due to compilation errors. +######## + +# [perl #10021] +use strict; +use warnings; +print "" if BAREWORD; +EXPECT +Bareword "BAREWORD" not allowed while "strict subs" in use at - line 5. +Execution of - aborted due to compilation errors. +######## +# Ticket: 18927 +use strict 'subs'; +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.