Stas Bekman wrote:
Here is a bizarre thing I've noticed. when running:

% env MOD_PERL_TRACE=h t/TEST -start

modperl_handler_resolve: [5465/1078234656 rabbit.stason.org:8529] handler
Apache::PerlSections was not compiled at startup, attempting to resolve
using server conf pool 0x81420a8

modperl_handler_resolve: [5465/1078234656 rabbit.stason.org:8529] handler
Apache::PerlSections was not compiled at startup, attempting to resolve
using server conf pool 0x81420a8

prints about 8 times. any idea why? Each time it then reports that it
resolved that handler, but then it does the same cycle again...

I've traced it down to this line :

        handler = modperl_handler_new(p, handler_name);

So basically, to be able to use the existing modperl_handler_* framework to
run <perl> sections, I am creating a brand new handler for each section,
creating that behaviour.

In the general case, where the handler will always be Apache::PerlSections,
this is quite wastfull. I've looked at what we have in modperl_handler and
I can't quite find a way to cleanly stash/retrieve my handler over each
iterations.

Best idea I can think of is to add an apr_table_t of <Perl> handlers in
scfg and search in there on each pass, creating if not already there.

Seems to me like I should be able to use modperl_handler_lookup_handlers
for this purpose, but I am not sure if it's possible.

--------------------------------------------------------------------------------
Philippe M. Chiasson m/gozer\@(apache|cpan|ectoplasm)\.org/ GPG KeyID : 88C3A5A5
http://gozer.ectoplasm.org/     F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3A5A5

Attachment: signature.asc
Description: OpenPGP digital signature



Reply via email to