This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Revert "[perl #118747] Allow in-place s///g when !!PL_sawampersand"
authorFather Chrysostomos <sprout@cpan.org>
Thu, 22 Aug 2013 08:15:03 +0000 (01:15 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Thu, 22 Aug 2013 08:15:03 +0000 (01:15 -0700)
This reverts commit 1555b325296e46f7b95bee03fe856cec348b0d57.

This is causing test failures (not on my machine), and I do not have
time right now to track them all down.

pp_hot.c

index 50a2de9..c30acc5 100644 (file)
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -2159,6 +2159,7 @@ PP(pp_subst)
        && !is_cow
 #endif
         && (I32)clen <= RX_MINLENRET(rx)
+        && (once || !(r_flags & REXEC_COPY_STR))
         && !(RX_EXTFLAGS(rx) & RXf_NO_INPLACE_SUBST)
        && (!doutf8 || SvUTF8(TARG))
        && !(rpm->op_pmflags & PMf_NONDESTRUCT))