From: Dylan William Hardison Date: Thu, 30 Jun 2016 17:47:15 +0000 (-0400) Subject: Bug 1283612 - Add Bugzilla::Extension module loader last X-Git-Tag: release-5.1.2~109^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F7%2Fhead;p=thirdparty%2Fbugzilla.git Bug 1283612 - Add Bugzilla::Extension module loader last Currently, anything that is loaded after the bugzilla extensions are loaded has to search through each callback inserted into @INC by Bugzilla::Extension. If you have a lot of extensions this is slow. It is harmless to search for Bugzilla::Extension::* modules last, so we replace the unshift with a push. --- diff --git a/Bugzilla/Extension.pm b/Bugzilla/Extension.pm index fcd41ae868..eb17b9f1a7 100644 --- a/Bugzilla/Extension.pm +++ b/Bugzilla/Extension.pm @@ -143,7 +143,7 @@ sub modify_inc { # directory. We don't want Bugzilla's base lib/CGI.pm being loaded as # Bugzilla::Extension::Foo::CGI or any other confusing thing like that. return if $package_dir eq bz_locations->{'extensionsdir'}; - unshift(@INC, sub { __do_call($class, 'my_inc', @_) }); + push(@INC, sub { __do_call($class, 'my_inc', @_) }); } # This is what gets put into @INC by modify_inc.