diff options
author | Tassilo von Parseval <tassilo.parseval@post.rwth-aachen.de> | 2005-07-20 12:43:11 +0200 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2005-07-20 09:08:56 +0000 |
commit | f9bc45eff51a0e2fac1537ecee1124be910c832e (patch) | |
tree | 7de66ce3081a82e015c7583115e0bd924d5b67bc /pp_hot.c | |
parent | 37d19de818f4f6fae6d075d28278cad409bf2d33 (diff) | |
download | perl-f9bc45eff51a0e2fac1537ecee1124be910c832e.tar.gz |
lvalue-subs returning elements of tied hashes/arrays
Message-id: <20050720084311.GA20332@ethan>
p4raw-id: //depot/perl@25194
Diffstat (limited to 'pp_hot.c')
-rw-r--r-- | pp_hot.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -2441,7 +2441,10 @@ PP(pp_leavesublv) MARK = newsp + 1; EXTEND_MORTAL(1); if (MARK == SP) { - if (SvFLAGS(TOPs) & (SVs_TEMP | SVs_PADTMP | SVf_READONLY)) { + /* Temporaries are bad unless they happen to be elements + * of a tied hash or array */ + if (SvFLAGS(TOPs) & (SVs_TEMP | SVs_PADTMP | SVf_READONLY) && + !(SvRMAGICAL(TOPs) && mg_find(TOPs, PERL_MAGIC_tiedelem))) { LEAVE; cxstack_ix--; POPSUB(cx,sv); |