You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@perl.apache.org by Stas Bekman <st...@stason.org> on 2004/08/08 21:05:34 UTC

removing some autoconfig magic from A-T

Some of the autoconfig magic starts to create more overhead than it used 
to safe. e.g. all this magic of t/hooks/TestHooks is no longer useful, 
as we add more tests and the test names aren't mapping 1:1 to the phase 
name. So we need to craft <NoAutoConfig>, inline <Location > blocks, 
etc. e.g the recently added test has:
<NoAutoConfig>
<Location /TestHooks__authen_digest>
     require valid-user
     AuthType Digest
     AuthName "Simple Digest"
     PerlAuthenHandler TestHooks::authen_digest
     PerlResponseHandler Apache::TestHandler::ok1
     SetHandler modperl
</Location>
</NoAutoConfig>

while all is needed is:

     require valid-user
     AuthType Digest
     AuthName "Simple Digest"
     PerlAuthenHandler TestHooks::authen_digest
     PerlResponseHandler Apache::TestHandler::ok1
     SetHandler modperl

but at the moment it doesn't work.

I think we should start stripping those special cases from A-T. Same 
goes for filters which magically figures out which filter handler to 
register.

Finally may be we should remove the special handling of t/hook/TestHooks 
t/protocols/TestProtocols and t/filters/TestFilters and move them all to 
  t/response, but that may be after we move to svn so we don't lose the 
history.

-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

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


Re: removing some autoconfig magic from A-T

Posted by Stas Bekman <st...@stason.org>.
Geoffrey Young wrote:
> 
> Stas Bekman wrote:
> 
>>Some of the autoconfig magic starts to create more overhead than it used
>>to safe. e.g. all this magic of t/hooks/TestHooks is no longer useful,
>>as we add more tests and the test names aren't mapping 1:1 to the phase
>>name. 
> 
> 
>>I think we should start stripping those special cases from A-T. Same
>>goes for filters which magically figures out which filter handler to
>>register.
> 
> 
> I think I follow what you're talking about - like for
> hooks/TestHooks/authz.pm the PerlAuthzHandler is automatically added to
> httpd.conf even though it's not in the final config in __DATA__?

correct. And if you rename that phase to some other name it's will try 
to add some bogus handler name instead.

> personally, I always found this (single) bit of automagic very, very
> confusing.  so +1 to remove that bit and just require that __DATA__ be the
> config that you want.

Cool

what about the other thing I have mentioned? t/response vs. special 
t/hooks/TestHooks (protocols and filters?)

> is there more that <NoAutoConfig> suppresses?

There is a lot more, but at most other places, it works fine and saves a 
lot of typing and maintenance. So normally you won't need to disable 
autoconfig.

-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

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


Re: removing some autoconfig magic from A-T

Posted by Geoffrey Young <ge...@modperlcookbook.org>.

Stas Bekman wrote:
> Some of the autoconfig magic starts to create more overhead than it used
> to safe. e.g. all this magic of t/hooks/TestHooks is no longer useful,
> as we add more tests and the test names aren't mapping 1:1 to the phase
> name. 

> I think we should start stripping those special cases from A-T. Same
> goes for filters which magically figures out which filter handler to
> register.

I think I follow what you're talking about - like for
hooks/TestHooks/authz.pm the PerlAuthzHandler is automatically added to
httpd.conf even though it's not in the final config in __DATA__?

personally, I always found this (single) bit of automagic very, very
confusing.  so +1 to remove that bit and just require that __DATA__ be the
config that you want.

is there more that <NoAutoConfig> suppresses?

--Geoff

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