X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Flib%2Fstrict%2Fsubs;h=4f0e6215f717bb1665567ae71eaa4c4a8e57eb2e;hb=35d904946636411814f392bec019cad90a357c0a;hp=89a0bad6991c4e3767b8bcdde0a31d246b80a298;hpb=989dfb198ac9ac51842b1c51f1d0abd5c0143573;p=p5sagit%2Fp5-mst-13.2.git diff --git a/t/lib/strict/subs b/t/lib/strict/subs index 89a0bad..4f0e621 100644 --- a/t/lib/strict/subs +++ b/t/lib/strict/subs @@ -352,5 +352,31 @@ use strict; use warnings; print "" if BAREWORD; EXPECT -Bareword "BAREWORD" not allowed while "strict subs" in use at - line 5 +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.