On 02/17/2007 06:46 PM, Mary Anderson wrote:
The documentation wasn't very clear.
Under mod_perl, the above will work only for Apache::Registry scripts. Otherwise execution of the END block will be postponed until the process terminates. If you write a handler in the Perl API use the register_cleanup
() method instead. It accepts a reference to a subroutine as an argument:

  $r->register_cleanup(sub { $dbh->sync() });

I don't know what $r refers to.  Can you enlighten me?

Thanks again.
Mary



(Re-directed back to the list.)

I don't know what $r is. Perhaps it's set this way:

my $r = Apache->request;

Or maybe it's set this way:

my $r = shift;

However, neither of those work for me when I try to send the 'register_cleanup' message to $r.

http://perl.apache.org/docs/1.0/guide/debug.html#Safe_Resource_Locking_and_Cleanup_Code




--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to