mod_perl IfModule directives?
I know this isn't in mod_perl yet, so take this as a feature request :-) What I'd like to see is a mod_perl equivalent of IfModule, so that I can add custom config directives to my httpd.conf perfectly safely: IfPerlModule AxKit AxAddStyleMap text/xsl Apache::AxKit::Language::Sablot /IfPerlModule -- Matt/ Fastnet Software Ltd. High Performance Web Specialists Providing mod_perl, XML, Sybase and Oracle solutions Email for training and consultancy availability. http://sergeant.org | AxKit: http://axkit.org
RE: mod_perl IfModule directives?
-Original Message- From: Matt Sergeant [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 12, 2000 9:02 AM To: [EMAIL PROTECTED] Subject: mod_perl IfModule directives? I know this isn't in mod_perl yet, so take this as a feature request :-) What I'd like to see is a mod_perl equivalent of IfModule, so that I can add custom config directives to my httpd.conf perfectly safely: IfPerlModule AxKit AxAddStyleMap text/xsl Apache::AxKit::Language::Sablot /IfPerlModule cool idea... is Perl $AxAddStyleMap = "text/xsl Apache::AxKit::Language::Sablot" if Apache-module('AxKit'); /Perl good enough for the moment? --Geoff -- Matt/ Fastnet Software Ltd. High Performance Web Specialists Providing mod_perl, XML, Sybase and Oracle solutions Email for training and consultancy availability. http://sergeant.org | AxKit: http://axkit.org
RE: mod_perl IfModule directives?
On Tue, 12 Sep 2000, Geoffrey Young wrote: cool idea... is Perl $AxAddStyleMap = "text/xsl Apache::AxKit::Language::Sablot" if Apache-module('AxKit'); /Perl good enough for the moment? I'm not convinced that will work, since it sets the directives in the Apache::ReadConfig package, not mine. Besides, I think you just made up Apache-module() :-) -- Matt/ Fastnet Software Ltd. High Performance Web Specialists Providing mod_perl, XML, Sybase and Oracle solutions Email for training and consultancy availability. http://sergeant.org | AxKit: http://axkit.org
RE: mod_perl IfModule directives?
-Original Message- From: Matt Sergeant [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 12, 2000 9:21 AM To: Geoffrey Young Cc: [EMAIL PROTECTED] Subject: RE: mod_perl IfModule directives? On Tue, 12 Sep 2000, Geoffrey Young wrote: cool idea... is Perl $AxAddStyleMap = "text/xsl Apache::AxKit::Language::Sablot" if Apache-module('AxKit'); /Perl good enough for the moment? I'm not convinced that will work, since it sets the directives in the Apache::ReadConfig package, not mine. I just tested it with Apache::Dispatch, which also uses ModuleConfig, and it works just fine. I guess it depends on the mechanism you are using to make your directives visible in your module... Besides, I think you just made up Apache-module() :-) oh, to have such power ;) --Geoff -- Matt/ Fastnet Software Ltd. High Performance Web Specialists Providing mod_perl, XML, Sybase and Oracle solutions Email for training and consultancy availability. http://sergeant.org | AxKit: http://axkit.org
RE: mod_perl IfModule directives?
On Tue, 12 Sep 2000, Geoffrey Young wrote: I'm not convinced that will work, since it sets the directives in the Apache::ReadConfig package, not mine. I just tested it with Apache::Dispatch, which also uses ModuleConfig, and it works just fine. I guess it depends on the mechanism you are using to make your directives visible in your module... You're right - should have tested. However a Perl section is only really a stop-gap towards a real solution. -- Matt/ Fastnet Software Ltd. High Performance Web Specialists Providing mod_perl, XML, Sybase and Oracle solutions Email for training and consultancy availability. http://sergeant.org | AxKit: http://axkit.org
Re: mod_perl IfModule directives?
On Tue, 12 Sep 2000, Matt Sergeant wrote: I know this isn't in mod_perl yet, so take this as a feature request :-) really, how do you know that? ;) What I'd like to see is a mod_perl equivalent of IfModule, so that I can add custom config directives to my httpd.conf perfectly safely: IfPerlModule AxKit AxAddStyleMap text/xsl Apache::AxKit::Language::Sablot /IfPerlModule you can already do that with modules that implement directive handlers: PerlModule Apache::AxKit IfModule Apache::AxKit ... /IfModule i didn't realize/thinkabout it until you asked though. p.s. have a look at mod_info's output w/ AxKit loaded if you haven't already