> -----Original Message-----
> From: Christian Gilmore [mailto:[EMAIL PROTECTED]]
> Sent: Monday, June 26, 2000 11:40 AM
> To: 'Eric Cholet'
> Cc: 'Modperl Mailing List (E-mail)'
> Subject: RE: set_handlers() bug?
> 
> 
> So, I've done a bit more debugging. It looks like set_handlers is all
> befuddled. I have the below code:
> 
>   my $handlers = $r->get_handlers('PerlAuthzHandler');
>   foreach (@$handlers) {
>     $r->log->debug("handler: (Pre) PerlAuthzHandler $_ next in line");
>   }
>   # Per Eric Cholet
>   # $r->set_handlers(PerlAuthzHandler => [\&OK]);
>   $r->set_handlers(PerlAuthzHandler => [\&Tivoli::Apache::AuthzCache,
> \&OK]);
>   #$r->set_handlers(PerlAuthzHandler => undef);
>   $handlers = $r->get_handlers('PerlAuthzHandler');
>   foreach (@$handlers) {
>     $r->log->debug("handler: (Post) PerlAuthzHandler $_ next 
> in line");
>   }
>   return OK;
> 
> [Mon Jun 26 10:30:58 2000] [debug]
> /opt/apache/dw3.tivoli.com/81/lib/perl/Tivoli/Apache/AuthzCach
> e.pm(132):
> [client 146.84.34.143] handler: (Pre) PerlAuthzHandler
> Tivoli::Apache::AuthzCache::handler next in line
> [Mon Jun 26 10:30:58 2000] [debug]
> /opt/apache/dw3.tivoli.com/81/lib/perl/Tivoli/Apache/AuthzCach
> e.pm(132):
> [client 146.84.34.143] handler: (Pre) PerlAuthzHandler
> Tivoli::Apache::AuthzLDAP next in line
> [Mon Jun 26 10:30:58 2000] [debug]
> /opt/apache/dw3.tivoli.com/81/lib/perl/Tivoli/Apache/AuthzCach
> e.pm(132):
> [client 146.84.34.143] handler: (Pre) PerlAuthzHandler
> Tivoli::Apache::AuthzCache::manage_cache next in line
> [Mon Jun 26 10:30:58 2000] [debug]
> /opt/apache/dw3.tivoli.com/81/lib/perl/Tivoli/Apache/AuthzCach
> e.pm(140):
> [client 146.84.34.143] handler: (Post) PerlAuthzHandler 
> CODE(0x4a3a00) next
> in line
> [Mon Jun 26 10:30:58 2000] [debug]
> /opt/apache/dw3.tivoli.com/81/lib/perl/Tivoli/Apache/AuthzCach
> e.pm(140):
> [client 146.84.34.143] handler: (Post) PerlAuthzHandler 
> CODE(0x1840c4) next
> in line
> 
> The behavior I see is that changes to set_handlers that 
> aren't set to undef
> are ignored. AuthzLDAP and AuthzCache::manage_cache are still 
> called even
> though I set the handlers to be a stack of AuthzCache and OK. 
> According to
> get_handlers, I'm getting garbage back after I do a 
> set_handlers. 

I don't think that you're getting garbage - the CODE section is the [\&OK]
coderef you set earlier...

I reported some fishy get/set handlers issues a little while ago - this
roughly sounds similar to the types of things I have been seeing.  If I can
speak sweepingly for a moment, get/set handlers seems to be somewhat
unstable for the kinds of things I want to use it for, particularly coderefs
(see http://marc.theaimsgroup.com/?l=apache-modperl&m=95721313917562&w=2)
You may be stumbling on some of the same issues (but maybe not...)

I have an upgrade to Apache::DebugInfo waiting on these issues before
official release - you may, however, find it helpful for debugging or
tracing some of the stuff you are reporting (it will, for instance, dump
enabled Perl*Handlers, but it uses get/set handlers lots so it also may add
to your grief). feel free to use the 0.05 pre-release (with the usual
caveats, of course :)
http://morpheus.laserlink.net/~gyoung/modules/Apache-DebugInfo-0.05.tar.gz


IIRC, Doug agreed to take a look at get/set handlers issues 'soonish' :)

HTH

--Geoff


>When I do
> a set of undef, get returns nothing, properly enough, but the 
> DirectoryIndex
> is ignored/missing.
> 
> Regards,
> Christian
> 

Reply via email to