Aha! The (in)famous, mod_perl does not run my 'END'-blocks matter.
The canonical way of solving this problem is by either registering your own PerlCleanupHandler in the config-file of your Apache or by making a call to the register_cleanup method early in your script:
$r is your request object$r->register_cleanup(sub { ***your cleanup code here*** });
Your clean-up code then gets to run everytime your script finishes and not only when the child processing this request terminates.
You could also take the easy way out and let your scripts run under Apache::Registry which let END-blocks run the way we are used to.
CountZero
"If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law
In reply to Re: Don't understand END blocks in mod_perl
by CountZero
in thread Don't understand END blocks in mod_perl
by Mur
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |