If mod_perl module loaded from within httpd.conf

2002-03-13 Thread George Sanderson

What is the best way to check from within the httpd.conf file if a mod_perl
module is loaded.  For C modules, I can use:
IfModule mod_perl.c ... /IfModule
to conditionally load it's directives.
Is there a similar conditional syntax for the mod_perl script modules?
I only want a module's directives to be processed when that module is loaded.

++
| George Sanderson [EMAIL PROTECTED]
| http://www.xorgate.com
++




Re: If mod_perl module loaded from within httpd.conf

2002-03-13 Thread Geoffrey Young



George Sanderson wrote:

 What is the best way to check from within the httpd.conf file if a mod_perl
 module is loaded.  For C modules, I can use:
 IfModule mod_perl.c ... /IfModule
 to conditionally load it's directives.
 Is there a similar conditional syntax for the mod_perl script modules?
 I only want a module's directives to be processed when that module is loaded.


you can use the module() method from the Apache class to test for either a C 
module or a Perl one.

   $foo if Apache-module('mod_perl.c');
   $foo if Apache-module('My::Module');

see recipe 4.2 in the cookbook for a few examples, including how to use it from 
a Perl section in your httpd.conf

--Geoff