NAME
POE::Declare::Meta::Timeout - A named timeout event with support methods
SYNOPSIS
# Send a request
sub request : Event {
$_[SELF]->request_timeout_start;
$_[SELF]->{handle}->put('something');
}
# Recieved a response
sub response : Event {
if ( $_[ARG0] eq 'keepalive' ) {
$_[SELF]->request_timeout_restart;
return;
}
$_[SELF]->request_timeout_stop;
$_[SELF]->{parent}->post('child_response', $_[ARG0]);
}
# Did not get a response
sub request_timeout : Timeout(30) {
# Take some action
$_[SELF]->cleanup;
$_[SELF]->{parent}->post('child_response', 'timeout');
}
DESCRIPTION
POE::Declare::Meta::Timeout is a sub-class of Event
with access to a number of additional methods relating to timers and alarms.
SUPPORT
Bugs should be always be reported via the CPAN bug tracker at
http://rt.cpan.org/NoAuth/ReportBug.html?Queue=POE-Declare
For other issues, or commercial enhancement or support, contact the author.
AUTHORS
Adam Kennedy <adamk@cpan.org>
SEE ALSO
COPYRIGHT
Copyright 2006 - 2009 Adam Kennedy.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.