diff options
-rw-r--r-- | pp_ctl.c | 1 | ||||
-rw-r--r-- | t/lib/strict/refs | 6 | ||||
-rw-r--r-- | t/lib/strict/subs | 7 | ||||
-rw-r--r-- | t/lib/strict/vars | 7 |
4 files changed, 20 insertions, 1 deletions
@@ -2714,7 +2714,6 @@ Perl_sv_compile_2op(pTHX_ SV *sv, OP** startop, char *code, PAD** padp) #else SAVEVPTR(PL_op); #endif - PL_hints &= HINT_UTF8; /* we get here either during compilation, or via pp_regcomp at runtime */ runtime = IN_PERL_RUNTIME; diff --git a/t/lib/strict/refs b/t/lib/strict/refs index 10599b0bb2..b6a2753360 100644 --- a/t/lib/strict/refs +++ b/t/lib/strict/refs @@ -295,3 +295,9 @@ eval ' my $a = ${"Fred"} ; EXPECT Can't use string ("Fred") as a SCALAR ref while "strict refs" in use at - line 8. +######## +# [perl #26910] hints not propagated into (?{...}) +use strict 'refs'; +/(?{${"foo"}++})/; +EXPECT +Can't use string ("foo") as a SCALAR ref while "strict refs" in use at (re_eval 1) line 1. diff --git a/t/lib/strict/subs b/t/lib/strict/subs index 6cf988c7d8..4f0e6215f7 100644 --- a/t/lib/strict/subs +++ b/t/lib/strict/subs @@ -373,3 +373,10 @@ 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. diff --git a/t/lib/strict/vars b/t/lib/strict/vars index ab24c9d580..e48283193b 100644 --- a/t/lib/strict/vars +++ b/t/lib/strict/vars @@ -430,3 +430,10 @@ EXPECT Global symbol "@k" requires explicit package name at - line 4. Global symbol "$k" requires explicit package name at - line 4. Execution of - aborted due to compilation errors. +######## +# [perl #26910] hints not propagated into (?{...}) +use strict 'vars'; +qr/(?{$foo++})/; +EXPECT +Global symbol "$foo" requires explicit package name at (re_eval 1) line 1. +Compilation failed in regexp at - line 3. |