Is it possible that another handler (such as CGI, or parsed-html) is
taking over before yours and exiting or returning OK.
Rob
>Hi,
>
>I just ran into a problem with $r->register_cleanup() only sometime beeing
>called.
>
>This is mod_perl 1.24_01, perl 5.6.0, apache 1.3.14 compiled with gcc 5.6.0 on
>AIX 4.3.3.
>
>Here's a sample code (snippet):
>
>sub handler { # PerlTransHandler
> my $r = shift;
> $r->register_cleanup(\&clean1);
> $r->push_handlers(PerlCleanupHandler => \&clean2);
> $r->pnotes('cleanup', bless {} );
> print STDERR 'in ";
> return DECLINE;
>}
>
>sub clean1 { print STDERR "register_cleanup "; }
>sub clean2 { print STDERR "push_handlers "; }
>sub DESTROY { print STDERR "DESTROY\n"; }
>
>And that's the error_log:
>
>in register_cleanup push_handlers DESTROY
>in register_cleanup push_handlers DESTROY
>in push_handlers DESTROY
>in push_handlers DESTROY
>in push_handlers DESTROY
>in register_cleanup push_handlers DESTROY
>in push_handlers DESTROY
>in push_handlers DESTROY
>in push_handlers DESTROY
>in push_handlers DESTROY
>in push_handlers DESTROY
>in push_handlers DESTROY
>in push_handlers DESTROY
>in push_handlers DESTROY
>in register_cleanup push_handlers DESTROY
>in push_handlers DESTROY
>....
>
>The pushed handler only get's called about a third or less of the time. :-(
>
>Any idea, bug?
>
>Michael Jacob
>
>PS: Yes I did some tests with -x...
Robert L. Landrum
Senior Programmer
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"It's working correctly. It's simply working in contrast to what you have
perceived to be correct."