diff options
author | Father Chrysostomos <sprout@cpan.org> | 2014-08-28 18:26:36 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2014-09-15 06:19:32 -0700 |
commit | ae77754ae288180ef1b6bab63dd49fa724d9fddd (patch) | |
tree | 2117fa17eff09c3b743f144a60d16c352c152bcd /pp_hot.c | |
parent | e38faec93a3dca999da366b2f1cec7a005c2b41b (diff) | |
download | perl-ae77754ae288180ef1b6bab63dd49fa724d9fddd.tar.gz |
For lexical subs, reify CvGV from CvSTASH and CvNAME_HEK
From now on, the presence of a name hek implies a GV. Any access to
CvGV will cause that implicit GV to be reified.
Diffstat (limited to 'pp_hot.c')
-rw-r--r-- | pp_hot.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -2595,15 +2595,15 @@ PP(pp_entersub) SV* sub_name; /* anonymous or undef'd function leaves us no recourse */ - if (CvANON(cv) || !(gv = CvGV(cv))) { - if (CvNAMED(cv)) - DIE(aTHX_ "Undefined subroutine &%"HEKf" called", - HEKfARG(CvNAME_HEK(cv))); + if (CvLEXICAL(cv) && CvHASGV(cv)) + DIE(aTHX_ "Undefined subroutine &%"SVf" called", + SVfARG(cv_name(cv, NULL))); + if (CvANON(cv) || !CvHASGV(cv)) { DIE(aTHX_ "Undefined subroutine called"); } /* autoloaded stub? */ - if (cv != GvCV(gv)) { + if (cv != GvCV(gv = CvGV(cv))) { cv = GvCV(gv); } /* should call AUTOLOAD now? */ |