This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Remove redundant targets from Win32 Makefile
[perl5.git] / doop.c
diff --git a/doop.c b/doop.c
index 7aee091..e5c3d1c 100644 (file)
--- a/doop.c
+++ b/doop.c
@@ -1,6 +1,7 @@
 /*    doop.c
  *
- *    Copyright (c) 1991-2002, Larry Wall
+ *    Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+ *    2000, 2001, 2002, by Larry Wall and others
  *
  *    You may distribute under the terms of either the GNU General Public
  *    License or the Artistic License, as specified in the README file.
@@ -600,18 +601,19 @@ Perl_do_trans(pTHX_ SV *sv)
                     (OPpTRANS_FROM_UTF|OPpTRANS_TO_UTF));
 
     if (SvREADONLY(sv)) {
-        if (SvFAKE(sv))
-            sv_force_normal(sv);
+        if (SvIsCOW(sv))
+            sv_force_normal_flags(sv, 0);
         if (SvREADONLY(sv) && !(PL_op->op_private & OPpTRANS_IDENTICAL))
             Perl_croak(aTHX_ PL_no_modify);
     }
     (void)SvPV(sv, len);
     if (!len)
        return 0;
-    if (!SvPOKp(sv))
-       (void)SvPV_force(sv, len);
-    if (!(PL_op->op_private & OPpTRANS_IDENTICAL))
+    if (!(PL_op->op_private & OPpTRANS_IDENTICAL)) {
+       if (!SvPOKp(sv))
+           (void)SvPV_force(sv, len);
        (void)SvPOK_only_UTF8(sv);
+    }
 
     DEBUG_t( Perl_deb(aTHX_ "2.TBL\n"));