toke.c: Pass GV_NOTQUAL for override lookup
authorFather Chrysostomos <sprout@cpan.org>
Wed, 4 Dec 2013 12:24:32 +0000 (04:24 -0800)
committerFather Chrysostomos <sprout@cpan.org>
Wed, 4 Dec 2013 12:41:35 +0000 (04:41 -0800)
We know in this code path that the name is unqualified, so tell
gv_fetchpvn_flags to skip the parser that looks for package
separators.

toke.c

index 6e30000..b146cdc 100644 (file)
--- a/toke.c
+++ b/toke.c
@@ -7112,7 +7112,8 @@ Perl_yylex(pTHX)
            if (PL_expect != XOPERATOR && (*s != ':' || s[1] != ':')) {
                CV *cv;
                if ((gv = gv_fetchpvn_flags(PL_tokenbuf, len,
-                                            UTF ? SVf_UTF8 : 0, SVt_PVCV)) &&
+                                           (UTF ? SVf_UTF8 : 0)|GV_NOTQUAL,
+                                           SVt_PVCV)) &&
                    (cv = GvCVu(gv)))
                {
                    if (GvIMPORTED_CV(gv))