perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Philippe M. Chiasson" <>
Subject Re: a new directive: PerlStartupFile?
Date Sat, 11 Dec 2004 01:39:57 GMT
Stas Bekman wrote:
> OK, the post_config story is now resolved, we can get back to this 
> discussion.
> Larry Leszczynski wrote:
>> Hi Stas -
>>> As a followup to the discussed issue, we need to redefine the concept 
>>> of:
>>>   "put those things in"
>>> we now need to say:
>>>    "put those things in post_config phase handler"
>> [...]
>>> So there is a possibility to introduce a new directive: PerlStartupFile
>>> (feel free to suggest a better name) which will be:
>>> PerlStartupFile ""
>> [...]
>>> after discussing this with gozer on irc we aren't sure this is a good
>>> idea, as for most people using the old concept will still 
>>> work.
>> Leaving things as-is sounds like it might be asking for trouble, e.g.
>> people not aware of the implications between config and post-config, or
>> people still using "PerlRequire" from their mp1 setup and it
>> works ok by coincidence, and suddenly stops working (or fails in
>> mysterious ways) when they add something that unknowingly breaks the 
>> rules
>> about config vs. post-config phases.
> Everything will work just the same either way, it's just that STDERR is 
> closed during the config phase's 2nd pass (when Apache restarts itself).

And also, most people will not be doing things that are 'forbidden' in there,
like running different code on each pass, so it should be harmless in most

>> Maybe it would also help to introduce an alias for PerlRequire called
>> something like PerlConfigFile, to make it more obvious it should only be
>> used to modify config, and recommend that instead of using "PerlRequire
>>" people should do:
>>    PerlConfigFile  ""
>>    PerlStartupFile ""
>> Or maybe since there is already PerlPostConfigHandler, parallel that and
>> use the name PerlPostConfigFile instead of PerlStartupFile?:
>>    PerlConfigFile     ""
>>    PerlPostConfigFile ""

I like the consistency in this case.

>> (Don't know about that, maybe PerlStartupFile seems more intuitive about
>> what you'd use it for...)
> Yup, those are the two ideas philippe and I have discussed, we are just 
> not sure it's a very good idea to introduce a new directive which does 
> the same thing as PerlRequire. But in fact I like the idea. Since 
> PerlRequire normally is not run during the config phase (unless 
> something forces perl startup early, e.g. perlloadmodule or <perl> 
> section). So currently:
>   PerlRequire ""
> doesn't necessarily runs during the config phase.
> by making PerlConfigFile forcing perl startup early, it'll make more 
> sense, since it'll ensure to be run during the config phase.

Yes. less magic and more consistency. I think it does make sense.
> and then of course PerlPostConfigFile which does the wrapping to push 
> the handler is a nice sugar syntax.
> So I'm +1 for:
>     PerlConfigFile     ""
>     PerlPostConfigFile ""

I think it's a good choice as well, but what about PerlRequire itself ? Just an
alias to PerlConfigFile ?
Philippe M. Chiasson m/gozer\@(apache|cpan|ectoplasm)\.org/ GPG KeyID : 88C3A5A5     F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3A5A5

View raw message