summaryrefslogtreecommitdiff
path: root/pp_ctl.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2011-06-16 22:31:07 +0200
committerNicholas Clark <nick@ccl4.org>2011-06-23 15:07:18 +0200
commit134b8cd8023b245ceceb96a0cb1a255bd3400f27 (patch)
treed25f659e6fe4b6c0f21fc54135d460ffce7313fb /pp_ctl.c
parentbfafcb9a4c258bd72d8c22f5d8af5edc8897f48e (diff)
downloadperl-134b8cd8023b245ceceb96a0cb1a255bd3400f27.tar.gz
Test studied scalars with s///ge.
Diffstat (limited to 'pp_ctl.c')
-rw-r--r--pp_ctl.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/pp_ctl.c b/pp_ctl.c
index 00164843c1..8e53116ee2 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -298,6 +298,13 @@ PP(pp_substcont)
s -= RX_GOFS(rx);
/* Are we done */
+ /* I believe that we can't set REXEC_SCREAM here if
+ SvSCREAM(cx->sb_targ) is true because SvPVX(cx->sb_targ) isn't always
+ equal to s. [See the comment before Perl_re_intuit_start(), which is
+ called from Perl_regexec_flags(), which says that it should be when
+ SvSCREAM() is true.] s, cx->sb_strend and orig will be consistent
+ with SvPVX(cx->sb_targ), as substconst doesn't modify cx->sb_targ
+ during the match. */
if (CxONCE(cx) || s < orig ||
!CALLREGEXEC(rx, s, cx->sb_strend, orig,
(s == m) + RX_GOFS(rx), cx->sb_targ, NULL,