You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by john doe <ab...@yahoo.com> on 2006/06/26 20:19:06 UTC

current callback bug?

So I want to register a method to be run during the cleanup phase.  After the content phase I'm in the logging phase and I do the following:

$r->register_cleanup(sub { $self->process_queue(); });

Inside process_queue method I print out what phase I'm in using r->current_callback(), it "claims" I'm in the logging phase:

print STDERR $r->current_callback()
PerlLogHandler

HOWEVER:  (The below reports correctly)

Instead of using the register_cleanup alias, I use: $r->push_handlers(PerlCleanupHandler => sub { $self->process_queue(); } );

print STDERR $r->current_callback()
PerlCleanupHandler


So is current_callback reporting  not working and reporting the wrong phase??? Or is register_cleanup not pushing the method onto the cleanup phase properly?
 __________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com