AnyEvent-Retry
view release on metacpan or search on metacpan
lib/AnyEvent/Retry.pm view on Meta::CPAN
=head2 try
Required. This is the coderef to run repeatedly. It is passed two
coderefs as args, C<success_cb> and C<error_cb>. Your coderef must
call one of those; success with a true value if the process is
complete and should not run again, success with a false value if the
process should run again, or error with an error message if the
process failed (and will not run again).
This is "continuation passing style". It's necessary so that your
C<try> block can kick off asynchronous jobs.
=head2 on_failure
Required. Callback to call when the job fails. Called a maximum of one time.
When called, it will be called with two args; the type of error, and
the error message.
The type of error can be C<max_tries>, C<exception>, or C<demolish>.
( run in 0.219 second using v1.01-cache-2.11-cpan-0d8aa00de5b )