This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
op.c:ck_glob: Check PL_globhook before loading File::Glob
authorFather Chrysostomos <sprout@cpan.org>
Sun, 29 Apr 2012 04:27:40 +0000 (21:27 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Tue, 22 May 2012 04:36:36 +0000 (21:36 -0700)
commit39e3b1bcb1568b34b8b8303630cb1bc8dad1eb14
treefe107f808df608637b478d98adc1ea50c3e15161
parent3dd32f5688d5d8551d930973f2fac3251cba505d
op.c:ck_glob: Check PL_globhook before loading File::Glob

By loading File::Glob when there is no CORE::GLOBAL::glob, we just end
up calling Perl_load_module for every glob op, since File::Glob no
longer uses CORE::GLOBAL::glob by default.

We could just as well check whether PL_globhook is set, which would
be faster.

(File::Glob sets PL_globhook when it loads.  In 5.14, it didn’t
set anything, but ck_glob itself would set CORE::GLOBAL::glob to
File::Glob::csh_glob.)
op.c