diff options
-rw-r--r-- | pp.c | 7 | ||||
-rw-r--r-- | pp_ctl.c | 4 | ||||
-rw-r--r-- | pp_hot.c | 3 |
3 files changed, 3 insertions, 11 deletions
@@ -5552,13 +5552,6 @@ PP(pp_split) /* we never pass the REXEC_COPY_STR flag, so it should * never get copied */ assert(!RX_MATCH_COPIED(rx)); - if (RX_MATCH_COPIED(rx) && RX_SUBBEG(rx) != orig) { - m = s; - s = orig; - orig = RX_SUBBEG(rx); - s = orig + (m - s); - strend = s + (strend - m); - } m = RX_OFFS(rx)[0].start + orig; if (gimme_scalar) { @@ -216,9 +216,7 @@ PP(pp_substcont) if (CxONCE(cx) || s < orig || !CALLREGEXEC(rx, s, cx->sb_strend, orig, (s == m) + RX_GOFS(rx), cx->sb_targ, NULL, - ((cx->sb_rflags & REXEC_COPY_STR) - ? (REXEC_IGNOREPOS|REXEC_NOT_FIRST) - : (REXEC_COPY_STR|REXEC_IGNOREPOS|REXEC_NOT_FIRST)))) + (REXEC_IGNOREPOS|REXEC_NOT_FIRST))) { SV *targ = cx->sb_targ; @@ -2217,7 +2217,8 @@ PP(pp_subst) #ifdef PERL_OLD_COPY_ON_WRITE && !is_cow #endif - && (I32)clen <= RX_MINLENRET(rx) && (once || !(r_flags & REXEC_COPY_STR)) + && (I32)clen <= RX_MINLENRET(rx) + && (once || !(r_flags & REXEC_COPY_STR)) && !(RX_EXTFLAGS(rx) & RXf_LOOKBEHIND_SEEN) && (!doutf8 || SvUTF8(TARG)) && !(rpm->op_pmflags & PMf_NONDESTRUCT)) |