summaryrefslogtreecommitdiff
path: root/doop.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2001-12-02 20:52:32 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-12-02 20:01:24 +0000
commit2233f375aa37a706e02f773eded0886e392aa503 (patch)
tree6ded52299120629b0e81838a098c90f860143752 /doop.c
parent117c9db16c535ffa926174c60f260279c800cc8b (diff)
downloadperl-2233f375aa37a706e02f773eded0886e392aa503.tar.gz
Shared hash keys
Message-ID: <20011202205232.U21702@plum.flirble.org> p4raw-id: //depot/perl@13430
Diffstat (limited to 'doop.c')
-rw-r--r--doop.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/doop.c b/doop.c
index 8600b7c93e..bc772018bb 100644
--- a/doop.c
+++ b/doop.c
@@ -599,9 +599,12 @@ Perl_do_trans(pTHX_ SV *sv)
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;