projects
/
platform
/
upstream
/
perl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d1bef64
)
op.c:ck_glob: Don’t do gv_fetchpv("CORE::GLOBAL::glob")
author
Father Chrysostomos
<sprout@cpan.org>
Sun, 29 Apr 2012 18:11:15 +0000
(11:11 -0700)
committer
Father Chrysostomos
<sprout@cpan.org>
Tue, 22 May 2012 04:37:36 +0000
(21:37 -0700)
We have PL_globalstash precisely to avoid the nested stash lookup in
cases like these.
op.c
patch
|
blob
|
history
diff --git
a/op.c
b/op.c
index
b86f094
..
1d199dc
100644
(file)
--- 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)) {