Perl Documentation
NAME
AxKit2::Continuation - A continuation helper
SYNOPSIS
use AxKit2::Continuation;
suspend {
my $self = shift;
$self->log(LOGDEBUG, "After continuation...");
return DECLINED;
}
DESCRIPTION
This module makes working with continuations easier. Instead of
registering multiple handlers and returning a special value, you can
temporarily suspend any handler with the suspend
keyword provided
by this module.
Your currently executing subroutine will be aborted when anyone calls
suspend
(even in nested function calls). Processing of the current
request will resume with the code block given to suspend
when
$client-
finish_continuation> is called. It is up to you to make sure
this happens.
The code block provided to suspend
gets the same arguments as the
currently executing hook.