summaryrefslogtreecommitdiff
path: root/op.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2012-04-29 11:11:15 -0700
committerFather Chrysostomos <sprout@cpan.org>2012-05-21 21:37:36 -0700
commit8113e1cc7c375dad847f931e099f9f0275786874 (patch)
tree262a3d3984dae2a00180fc4ae5378f447b6ebb1e /op.c
parentd1bef648d00af2e0c9ce78078a6f5588f1a9f79d (diff)
downloadperl-8113e1cc7c375dad847f931e099f9f0275786874.tar.gz
op.c:ck_glob: Don’t do gv_fetchpv("CORE::GLOBAL::glob")
We have PL_globalstash precisely to avoid the nested stash lookup in cases like these.
Diffstat (limited to 'op.c')
-rw-r--r--op.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/op.c b/op.c
index b86f094887..1d199dc1a5 100644
--- a/op.c
+++ b/op.c
@@ -8142,7 +8142,9 @@ Perl_ck_glob(pTHX_ OP *o)
else if (!((gv = gv_fetchpvs("glob", GV_NOTQUAL, SVt_PVCV))
&& GvCVu(gv) && GvIMPORTED_CV(gv)))
{
- gv = gv_fetchpvs("CORE::GLOBAL::glob", 0, SVt_PVCV);
+ GV * const * const gvp =
+ (GV **)hv_fetchs(PL_globalstash, "glob", FALSE);
+ gv = gvp ? *gvp : NULL;
}
if (gv && GvCVu(gv) && GvIMPORTED_CV(gv)) {