X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=doop.c;h=8bff60aa0a1a3ebdcb9507e9ec25de65d4ebba35;hb=597c4554ca87aa4325a00c70a0fbb22acbfcfa07;hp=1a5c829a6f1d17911194f09f022ecf5abfaf99db;hpb=7918f24d20384771923d344a382e1d16d9552018;p=p5sagit%2Fp5-mst-13.2.git diff --git a/doop.c b/doop.c index 1a5c829..8bff60a 100644 --- a/doop.c +++ b/doop.c @@ -633,10 +633,10 @@ Perl_do_trans(pTHX_ SV *sv) PERL_ARGS_ASSERT_DO_TRANS; - if (SvREADONLY(sv)) { + if (SvREADONLY(sv) && !(PL_op->op_private & OPpTRANS_IDENTICAL)) { if (SvIsCOW(sv)) sv_force_normal_flags(sv, 0); - if (SvREADONLY(sv) && !(PL_op->op_private & OPpTRANS_IDENTICAL)) + if (SvREADONLY(sv)) Perl_croak(aTHX_ PL_no_modify); } (void)SvPV_const(sv, len); @@ -1033,7 +1033,7 @@ Perl_do_chop(pTHX_ register SV *astr, register SV *sv) s = SvPV(sv, len); if (len && !SvPOK(sv)) - s = SvPV_force(sv, len); + s = SvPV_force_nomg(sv, len); if (DO_UTF8(sv)) { if (s && len) { char * const send = s + len;