diff options
author | Father Chrysostomos (via RT) <perlbug-followup@perl.org> | 2010-01-17 14:32:24 -0800 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2010-05-25 12:44:16 +0100 |
commit | bb1bc619ea68d9703fbd3fe5bc65ae000f90151f (patch) | |
tree | 64b580d9b4866d7532b1e7050147e511baccb88a /pp.c | |
parent | 6a5f8cbd14b4a44b35830907e944f1af0caeea90 (diff) | |
download | perl-bb1bc619ea68d9703fbd3fe5bc65ae000f90151f.tar.gz |
Deref ops ignore get-magic when SvROK(sv)
This is just like bug 68192, except in this case it’s a different set
of operators that have had this problem for much longer.
Diffstat (limited to 'pp.c')
-rw-r--r-- | pp.c | 13 |
1 files changed, 2 insertions, 11 deletions
@@ -139,6 +139,7 @@ PP(pp_rv2gv) { dVAR; dSP; dTOPss; + SvGETMAGIC(sv); if (SvROK(sv)) { wasref: tryAMAGICunDEREF(to_gv); @@ -156,11 +157,6 @@ PP(pp_rv2gv) } else { if (!isGV_with_GP(sv)) { - if (SvGMAGICAL(sv)) { - mg_get(sv); - if (SvROK(sv)) - goto wasref; - } if (!SvOK(sv) && sv != &PL_sv_undef) { /* If this is a 'my' scalar and flag is set then vivify * NI-S 1999/05/07 @@ -276,8 +272,8 @@ PP(pp_rv2sv) dVAR; dSP; dTOPss; GV *gv = NULL; + SvGETMAGIC(sv); if (SvROK(sv)) { - wasref: tryAMAGICunDEREF(to_sv); sv = SvRV(sv); @@ -295,11 +291,6 @@ PP(pp_rv2sv) gv = MUTABLE_GV(sv); if (!isGV_with_GP(gv)) { - if (SvGMAGICAL(sv)) { - mg_get(sv); - if (SvROK(sv)) - goto wasref; - } gv = Perl_softref2xv(aTHX_ sv, "a SCALAR", SVt_PV, &sp); if (!gv) RETURN; |