From 3317d729757a2d9776bdb4edff940b04df95545e Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" <> Date: Sat, 15 Sep 2007 04:28:47 +0000 Subject: Bug 394952: Allow extensions (aka plugins) to have a lib/ directory Patch By Max Kanat-Alexander r=ghendricks, a=mkanat --- Bugzilla/Hook.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Bugzilla/Hook.pm b/Bugzilla/Hook.pm index a02d0d671..6b710f8b5 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 $@; -- cgit v1.2.3-24-g4f1b