NAME
Sub::Retry::Extended - extend retring-code
SYNOPSIS
use Sub::Retry::Extended;
use Cache::Memcached::Fast;
my $cache = Cache::Memcached::Fast->new;
my $ret = retryX(
code => sub {
$cache->get('foo');
},
retry_if => sub {
my $res = shift;
defined $res ? 0 : 1;
},
times => 3,
delay => 0.1,
each_timeout => 1.5,
total_timeout => 2.5,
);
DESCRIPTION
Sub::Retry::Extended provides the retryX
function which has been extended interfaces from Sub::Retry.
METHOD
retryX(%hash)
below params are same as args of Sub::Retry 's retry
function.
code => \&code : required
retry_if => \&code : optional
times => $n_times : required
delay => $second // 0
below params are extended.
each_timeout => $second : optional
total_timeout => $second : optional
NOTE that each_timeout
does not include delay
time.
REPOSITORY
Sub::Retry::Extended is hosted on github: http://github.com/bayashi/Sub-Retry-Extended
Welcome your patches and issues :D
AUTHOR
Dai Okabayashi <bayashi@cpan.org>
SEE ALSO
LICENSE
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.