Upgrade to Devel::PPPort 3.14
[p5sagit/p5-mst-13.2.git] / doop.c
diff --git a/doop.c b/doop.c
index 1a5c829..8bff60a 100644 (file)
--- 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;