perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <>
Subject Re: [Patch mp2] PerlSections namespace
Date Wed, 10 Dec 2003 20:53:26 GMT
Geoffrey Young wrote:
>>>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.
>>That's exactly why people do *not* need to work directly with
>>Apache::ReadConfig - they have Apache->server->add_config() (and we are
>>talking about mp2). If people can achieve the same thing without using
>>Apache::ReadConfig, I think it should be completely deprecated, which
>>avoids the problem altogether. That's why I wanted to know if there are
>>cases where it's absolutely needed and you can't go without it.
> well, as I said, add_config() can't accomplish the same thing.  in fact,
> every time I've tried to use add_config() the way I want I haven't been able
> to.  not that it's not useful for some things, but it's not useful for the
> level of trickery that I'm used to being able to do with ReadConfig.

What do you mean, it can't? It just feeds the config sections as if you have 
written them in httpd.conf. I fail to see how it fails. The issue is that you 
completely lose the usefulness of using perl structures to accomplish that.

>>I think this case:
>>  package Foo;
>>  my $whatever = whatever();
>>  package Apache::ReadConfig;
>>  $User = $whatever;
>>can now become:
>>  package Foo;
>>  my $whatever = whatever();
>>  Apache->server->add_config("$User $whatever");
> this is entirely different than what I'm talking about.

I know. I was just showing a different, unrelated case where we need to deal 
with Apache::ReadConfig.

>>Though it's probably not going to be simple for creating more complex
>>config directives, e.g complex containers. Can you think of a good
>>solution for that case?
> I haven't tried add_config for containers, but it's interface seems
> straightforward enough (when it works at all).

Yes, but you will need to manually concatenate the config section, you can't 
use perl structures for that.

Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker     mod_perl Guide --->

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message