Re: [ID 20010806.006] Can't read coderef from tied variable
Abhijit Menon-Sen [Tue, 7 Aug 2001 09:10:54 +0000 (14:10 +0530)]
Message-ID: <20010807091054.H526@lustre.dyn.wiw.org>

p4raw-id: //depot/perl@11602

pp_hot.c

index daa1aee..c801c21 100644 (file)
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -2444,6 +2444,8 @@ PP(pp_entersub)
            }
            if (SvGMAGICAL(sv)) {
                mg_get(sv);
+               if (SvROK(sv))
+                   goto got_rv;
                sym = SvPOKp(sv) ? SvPVX(sv) : Nullch;
            }
            else
@@ -2455,6 +2457,7 @@ PP(pp_entersub)
            cv = get_cv(sym, TRUE);
            break;
        }
+  got_rv:
        {
            SV **sp = &sv;              /* Used in tryAMAGICunDEREF macro. */
            tryAMAGICunDEREF(to_cv);