
theory at bricolage
Apr 30, 2008, 11:33 AM
Post #1 of 1
(104 views)
Permalink
|
|
[8215] Only load mod_perl if we're running under mod_perl.
|
|
Revision: 8215 Author: theory Date: 2008-04-30 11:33:21 -0700 (Wed, 30 Apr 2008) ViewCVS: http://viewsvn.bricolage.cc/?rev=8215&view=rev Log Message: ----------- Only load mod_perl if we're running under mod_perl. Modified Paths: -------------- bricolage/trunk/lib/Bric/Util/ApacheUtil.pm Modified: bricolage/trunk/lib/Bric/Util/ApacheUtil.pm =================================================================== --- bricolage/trunk/lib/Bric/Util/ApacheUtil.pm 2008-04-30 18:25:20 UTC (rev 8214) +++ bricolage/trunk/lib/Bric/Util/ApacheUtil.pm 2008-04-30 18:33:21 UTC (rev 8215) @@ -33,12 +33,14 @@ use Bric::Config qw(:mod_perl); BEGIN { - if (MOD_PERL_VERSION < 2) { - require Apache; Apache->import(); - require Apache::Util; Apache::Util->import(); - } else { - require Apache2::Util; Apache2::Util->import(); - require Apache2::URI; Apache2::URI->import(); + if (MOD_PERL) { + if (MOD_PERL_VERSION < 2) { + require Apache; Apache->import(); + require Apache::Util; Apache::Util->import(); + } else { + require Apache2::Util; Apache2::Util->import(); + require Apache2::URI; Apache2::URI->import(); + } } }
|