Message-ID: <
20011202205232.U21702@plum.flirble.org>
p4raw-id: //depot/perl@13430
I32 hasutf = (PL_op->op_private &
(OPpTRANS_FROM_UTF|OPpTRANS_TO_UTF));
- if (SvREADONLY(sv) && !(PL_op->op_private & OPpTRANS_IDENTICAL))
- Perl_croak(aTHX_ PL_no_modify);
-
+ if (SvREADONLY(sv)) {
+ if (SvFAKE(sv))
+ sv_force_normal(sv);
+ if (SvREADONLY(sv) && !(PL_op->op_private & OPpTRANS_IDENTICAL))
+ Perl_croak(aTHX_ PL_no_modify);
+ }
(void)SvPV(sv, len);
if (!len)
return 0;
@INC = '../lib';
}
-print "1..70\n";
+print "1..71\n";
$_ = "abcdefghijklmnopqrstuvwxyz";
print "not " unless $a eq "XZY";
print "ok 70\n";
-
+# pp_trans needs to unshare shared hash keys
+# Used to fail with "Modification of a read-only value attempted"
+%a = (N=>1);
+foreach (keys %a) {
+ tr/N/n/;
+ print +($_ eq 'n' ? '' : "not ") . "ok 71\n";
+}