From: Max Kanat-Alexander Date: Tue, 28 Dec 2010 22:50:16 +0000 (-0800) Subject: Bug 621597: Make mod_perl.pl do the INC configuration itself, instead of X-Git-Tag: bugzilla-4.0rc2~28 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3ebbb7718d530f7e1fcd09f1f157959ff0f757a9;p=thirdparty%2Fbugzilla.git Bug 621597: Make mod_perl.pl do the INC configuration itself, instead of requiring it to be in httpd.conf. r=dkl, a=mkanat --- diff --git a/docs/en/xml/installation.xml b/docs/en/xml/installation.xml index 357dedcaed..2193dfe6f2 100644 --- a/docs/en/xml/installation.xml +++ b/docs/en/xml/installation.xml @@ -1136,7 +1136,7 @@ max_allowed_packet=4M - PerlSwitches -I/var/www/html/bugzilla -I/var/www/html/bugzilla/lib -w -T + PerlSwitches -w -T PerlConfigRequire /var/www/html/bugzilla/mod_perl.pl diff --git a/mod_perl.pl b/mod_perl.pl index 4a25d0c613..f12ae93a64 100644 --- a/mod_perl.pl +++ b/mod_perl.pl @@ -19,6 +19,13 @@ package Bugzilla::ModPerl; use strict; +# This sets up our libpath without having to specify it in the mod_perl +# configuration. +use File::Basename; +use lib dirname(__FILE__); +use Bugzilla::Constants (); +use lib Bugzilla::Constants::bz_locations()->{'ext_libpath'}; + # If you have an Apache2::Status handler in your Apache configuration, # you need to load Apache2::Status *here*, so that any later-loaded modules # can report information to Apache2::Status. @@ -38,7 +45,6 @@ use Template::Config (); Template::Config->preload(); use Bugzilla (); -use Bugzilla::Constants (); use Bugzilla::CGI (); use Bugzilla::Extension (); use Bugzilla::Install::Requirements ();