This is part of The Pile, a partial archive of some open source mailing lists and newsgroups.
Date: Tue, 12 Sep 2000 14:01:39 +0100 (BST) From: Matt Sergeant <matt@sergeant.org> To: modperl@apache.org 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> === From: Geoffrey Young <gyoung@laserlink.net> To: "'Matt Sergeant'" <matt@sergeant.org>, modperl@apache.org Subject: RE: mod_perl <IfModule> directives? Date: Tue, 12 Sep 2000 09:13:24 -0400 Matt Sergeant [mailto:matt@sergeant.org] wrote: > > 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? === Date: Tue, 12 Sep 2000 14:20:51 +0100 (BST) From: Matt Sergeant <matt@sergeant.org> To: Geoffrey Young <gyoung@laserlink.net> 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. Besides, I think you just made up Apache->module() :-) === From: Geoffrey Young <gyoung@laserlink.net> To: "'Matt Sergeant'" <matt@sergeant.org> Cc: modperl@apache.org Subject: RE: mod_perl <IfModule> directives? Date: Tue, 12 Sep 2000 09:26:05 -0400 Matt Sergeant [mailto:matt@sergeant.org] wrote: > > 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 ;) === Date: Tue, 12 Sep 2000 14:37:32 +0100 (BST) From: Matt Sergeant <matt@sergeant.org> To: Geoffrey Young <gyoung@laserlink.net> Subject: 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. === Date: Tue, 12 Sep 2000 09:07:02 -0700 (PDT) From: Doug MacEachern <dougm@covalent.net> To: Matt Sergeant <matt@sergeant.org> Subject: 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 ===