perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geoffrey Young <ge...@modperlcookbook.org>
Subject Re: [Patch mp2] PerlSections namespace
Date Wed, 10 Dec 2003 20:53:36 GMT

>>package Apache::Foo;
>>$Apache::ReadConfig::PerlFixupHandler = "Apache::Foo";
>>sub handler { };
>>
>>now, PerlModule Apache::Foo automatically installs a PerlFixupHandler :)
>>there are a few modules on CPAN that do this, IIRC.
> 
> 
> Yes, but this has always been partially broken as it is.
> 
> For example:
> 
> package Apache::Foo;
> $Apache::ReadConfig::Alias = qw(/some/path /some/alias);
> 
> 
> If you only do :
> 
> PerlModule Apache::Foo
> 
> and have no <Perl> sections in your httpd.conf, that code will not
> happen

really?  I'll have to check that :)

> 
> If you have more than one <Perl> section, you'll get warnings about
> re-defining an Alias directive for the same location, as the content of
> Apache::ReadConfig:: will be read and processed for every <Perl> block.

ugh, that's bad.

> 
> 
> 
>>it's similar to Apache->server->add_config() in mp2, but I've found that
>>method really not worth the trouble - it's goverened by overrides, so you
>>can never really trust that it will add the configuration data you pipe into it.
> 
> 
> Can you give me one such example ?

as I mentioned in reply to stas, add_config is equivalent to .htaccess files
- so wherever .htaccess files are disallowed, so are add_config() additions.

--Geoff


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Mime
View raw message