This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Avoid reifying GV when lex stub is used as method
authorFather Chrysostomos <sprout@cpan.org>
Mon, 15 Sep 2014 21:50:00 +0000 (14:50 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Mon, 15 Sep 2014 23:47:50 +0000 (16:47 -0700)
gv.c

diff --git a/gv.c b/gv.c
index 1b490f8..13f87d6 100644 (file)
--- a/gv.c
+++ b/gv.c
@@ -1101,7 +1101,7 @@ Perl_gv_fetchmethod_pvn_flags(pTHX_ HV *stash, const char *name, const STRLEN le
            GV* stubgv;
            GV* autogv;
 
-           if (CvANON(cv) || !CvGV(cv))
+           if (CvANON(cv) || CvLEXICAL(cv))
                stubgv = gv;
            else {
                stubgv = CvGV(cv);