Fix bug #26910: hints were not propagated into (?{...})
[p5sagit/p5-mst-13.2.git] / t / lib / strict / subs
index 4516de7..4f0e621 100644 (file)
@@ -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.