diff options
author | Rick Delaney <rick@consumercontact.com> | 2006-03-18 14:52:11 -0500 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2006-03-20 10:11:21 +0000 |
commit | 7a2e501a470d7096f8a5847c8002615db94d259b (patch) | |
tree | c4beabd1da817b736f2c9f96cac99f9ef7fe68ab /pp.c | |
parent | 4d743a9b1dd089ee06e7e583c66b2320c661183f (diff) | |
download | perl-7a2e501a470d7096f8a5847c8002615db94d259b.tar.gz |
Re: [perl #38710] localised stash slice
Message-ID: <20060319005211.GM25733@localhost.localdomain>
One can now localize slices.
p4raw-id: //depot/perl@27547
Diffstat (limited to 'pp.c')
-rw-r--r-- | pp.c | 18 |
1 files changed, 11 insertions, 7 deletions
@@ -3844,13 +3844,17 @@ PP(pp_hslice) DIE(aTHX_ PL_no_helem_sv, keysv); } if (localizing) { - if (preeminent) - save_helem(hv, keysv, svp); - else { - STRLEN keylen; - const char *key = SvPV_const(keysv, keylen); - SAVEDELETE(hv, savepvn(key,keylen), keylen); - } + if (HvNAME_get(hv) && isGV(*svp)) + save_gp((GV*)*svp, !(PL_op->op_flags & OPf_SPECIAL)); + else { + if (preeminent) + save_helem(hv, keysv, svp); + else { + STRLEN keylen; + const char *key = SvPV_const(keysv, keylen); + SAVEDELETE(hv, savepvn(key,keylen), keylen); + } + } } } *MARK = svp ? *svp : &PL_sv_undef; |