(retracted by 13077)
authorRobin Houston <robin@cpan.org>
Fri, 10 Aug 2001 14:42:02 +0000 (15:42 +0100)
committerJarkko Hietaniemi <jhi@iki.fi>
Sat, 11 Aug 2001 15:14:48 +0000 (15:14 +0000)
Subject: [PATCH] Re: [ID 20010809.028] x operator not copying elements in 'for' list?
Message-ID: <20010810144202.A32754@puffinry.freeserve.co.uk>

p4raw-id: //depot/perl@11635

pp.c

diff --git a/pp.c b/pp.c
index 1cb3a44..a051268 100644 (file)
--- a/pp.c
+++ b/pp.c
@@ -1139,8 +1139,10 @@ PP(pp_repeat)
        MEXTEND(MARK, max);
        if (count > 1) {
            while (SP > MARK) {
-               if (*SP)
-                   SvTEMP_off((*SP));
+               if (*SP) {
+                   *SP = sv_2mortal(newSVsv(*SP));
+                   SvREADONLY_on(*SP);
+               }
                SP--;
            }
            MARK++;