httpd-test-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gerald Richter" <>
Subject RE: loading mod_perl first?
Date Wed, 09 Feb 2005 14:27:28 GMT

> in TestConfigPerl we have this logic and comment
>     # modules like need to be loaded first,
>     # so make sure that it's loaded before files inherited from the
>     # global httpd.conf
>     $self->preamble_first(IfModule => '!mod_perl.c', $cfg);
> what this does is load ahead of all other 
> modules, giving it least priority.  there are a few problems 
> I see with this
>   - in 1.3 this is a _very_ untypical setup - 
> needs to be loaded last so that it gets first crack at each phase.
>   - in 2.X order doesn't matter due to the new hooking API, 
> but it _does_ matter for overriding directives.  that is, you 
> can't load first and get first crack at 
> _directive_ parsing.
> anyway, I guess what I'm saying is that 99% of the time we 
> want mod_perl to have the highest priority, but we do the 
> exact opposite with Apache-Test, which is probably ungood.
> now, in all fairness to embperl I don't want to just yank 
> this out without giving gerald some alternative.  however, I 
> think it's a bad idea to create a test environment that 
> doesn't accurately represent the most common case.
> so, here are some possible solutions...
>   - historically I think this was introduced before we had 
> functionality.  gerald, does using that 
> file help you?

I don't use Apache::Test (unless I install a new mod_perl and run make
test). If I remember right the reason why this was introduced, was that
mod_perl copied the LoadModule over from httpd.conf and the tests fails
then, when is loaded before, because there are
unresolved symbols.

I am not sure if this is still a problem.

>   - we could provide for an extra argument to 
> configure_libmodperl() which would place first 
> instead of the (new) default of last.  this would allow folks 
> like embperl to do something like
>   package My::TestConfigurePerl;
>   our @ISA = qw(Apache::TestConfigurePerl);
>   sub configure_libmodperl {  shift->SUPER::configure_libmodperl(1) }
> and have things work the way they did before.  patch attached.

I am not sure if I understand the whole picture, since digging in
Apache::Test was some time ago for me, but it looks like that this change
might make sense.


> thoughts?
> --Geoff

View raw message