From f4e68e82b126f2b2bfde4c660b1045c1e4a69455 Mon Sep 17 00:00:00 2001 From: Father Chrysostomos Date: Fri, 24 Jun 2011 06:20:16 -0700 Subject: [PATCH] Bypass a switch in gv_fetchpvn for 2-char symbols The switch that checks for ISA, EXPORT, etc. in packages other than main was guarded with an if(len>1) statement. Since ISA is three characters, we can bypass that entire switch for two-charac- ter symbols. --- gv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gv.c b/gv.c index 9bb428d..79bc0e9 100644 --- a/gv.c +++ b/gv.c @@ -1291,7 +1291,7 @@ Perl_gv_fetchpvn_flags(pTHX_ const char *nambeg, STRLEN full_len, I32 flags, if (stash != PL_defstash) { /* not the main stash */ /* We only have to check for four names here: EXPORT, ISA, OVERLOAD and VERSION. All the others apply only to the main stash. */ - if (len > 1) { + if (len > 2) { const char * const name2 = name + 1; switch (*name) { case 'E': -- 2.7.4