PADTMP it happily keeps it's value later on!
p4raw-id: //depot/perl@19254
/* Special case - not normally malloced for some reason */
if (SvREADONLY(sstr) && SvFAKE(sstr)) {
/* A "shared" PV - clone it as unshared string */
- SvFAKE_off(dstr);
- SvREADONLY_off(dstr);
+ if(!SvPADTMP(sstr)) {
+ /* However, some of them live in the pad
+ and they should not have these flags
+ turned off */
+ SvFAKE_off(dstr);
+ SvREADONLY_off(dstr);
+ }
SvPVX(dstr) = SAVEPVN(SvPVX(sstr), SvCUR(sstr));
}
else {