From: mkanat%bugzilla.org <> Date: Sat, 15 Sep 2007 04:28:47 +0000 (+0000) Subject: Bug 394952: Allow extensions (aka plugins) to have a lib/ directory X-Git-Tag: bugzilla-3.1.2~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3317d729757a2d9776bdb4edff940b04df95545e;p=thirdparty%2Fbugzilla.git Bug 394952: Allow extensions (aka plugins) to have a lib/ directory Patch By Max Kanat-Alexander r=ghendricks, a=mkanat --- diff --git a/Bugzilla/Hook.pm b/Bugzilla/Hook.pm index a02d0d6714..6b710f8b5c 100644 --- a/Bugzilla/Hook.pm +++ b/Bugzilla/Hook.pm @@ -44,6 +44,8 @@ sub process { next if -e "$extension/disabled"; if (-e $extension.'/code/'.$name.'.pl') { Bugzilla->hook_args($args); + # Allow extensions to load their own libraries. + local @INC = ("$extension/lib", @INC); do($extension.'/code/'.$name.'.pl'); ThrowCodeError('extension_invalid', { errstr => $@, name => $name, extension => $extension }) if $@;