Action-Retry
view release on metacpan or search on metacpan
META.yml
Makefile.PL
README
dist.ini
lib/Action/Retry.pm
lib/Action/Retry/Strategy.pm
lib/Action/Retry/Strategy/Constant.pm
lib/Action/Retry/Strategy/Fibonacci.pm
lib/Action/Retry/Strategy/HelperRole/RetriesLimit.pm
lib/Action/Retry/Strategy/HelperRole/SleepCapping.pm
lib/Action/Retry/Strategy/HelperRole/SleepTimeout.pm
lib/Action/Retry/Strategy/Linear.pm
t/00-compile.t
t/check_params.t
t/constant.t
t/fibonacci.t
t/linear.t
t/nonblocking.t
t/release-distmeta.t
t/release-pod-coverage.t
version: 0.24
Action::Retry::Strategy::Fibonacci:
file: lib/Action/Retry/Strategy/Fibonacci.pm
version: 0.24
Action::Retry::Strategy::HelperRole::RetriesLimit:
file: lib/Action/Retry/Strategy/HelperRole/RetriesLimit.pm
version: 0.24
Action::Retry::Strategy::HelperRole::SleepCapping:
file: lib/Action/Retry/Strategy/HelperRole/SleepCapping.pm
version: 0.24
Action::Retry::Strategy::HelperRole::SleepTimeout:
file: lib/Action/Retry/Strategy/HelperRole/SleepTimeout.pm
version: 0.24
Action::Retry::Strategy::Linear:
file: lib/Action/Retry/Strategy/Linear.pm
version: 0.24
requires:
Math::Fibonacci: 0
Module::Runtime: 0
Moo: 0
Scalar::Util: 0
Time::HiRes: 0
lib/Action/Retry/Strategy/Fibonacci.pm view on Meta::CPAN
# ABSTRACT: Fibonacci incrementation of sleep time strategy
use Math::Fibonacci qw(term);
use Moo;
with 'Action::Retry::Strategy';
with 'Action::Retry::Strategy::HelperRole::RetriesLimit';
with 'Action::Retry::Strategy::HelperRole::SleepTimeout';
has initial_term_index => (
is => 'ro',
lazy => 1,
default => sub { 0 },
);
# the current sequence term index
has _current_term_index => (
lib/Action/Retry/Strategy/Fibonacci.pm view on Meta::CPAN
my ($self) = @_;
$self->_current_term_index($self->_current_term_index + 1);
return;
}
sub needs_to_retry { 1 }
# Inherited from Action::Retry::Strategy::HelperRole::RetriesLimit
# Inherited from Action::Retry::Strategy::HelperRole::SleepTimeout
1;
__END__
=pod
=encoding UTF-8
lib/Action/Retry/Strategy/HelperRole/SleepTimeout.pm view on Meta::CPAN
#
# This file is part of Action-Retry
#
# This software is copyright (c) 2013 by Damien "dams" Krotkine.
#
# This is free software; you can redistribute it and/or modify it under
# the same terms as the Perl 5 programming language system itself.
#
package Action::Retry::Strategy::HelperRole::SleepTimeout;
{
$Action::Retry::Strategy::HelperRole::SleepTimeout::VERSION = '0.24';
}
# ABSTRACT: Helper to be consumed by Action::Retry Strategies, to enable giving up retrying when the sleep_time is too big
use Moo::Role;
has max_sleep_time => (
is => 'ro',
lazy => 1,
default => sub { undef },
lib/Action/Retry/Strategy/HelperRole/SleepTimeout.pm view on Meta::CPAN
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
Action::Retry::Strategy::HelperRole::SleepTimeout - Helper to be consumed by Action::Retry Strategies, to enable giving up retrying when the sleep_time is too big
=head1 VERSION
version 0.24
=head1 AUTHOR
Damien "dams" Krotkine
=head1 COPYRIGHT AND LICENSE
lib/Action/Retry/Strategy/Linear.pm view on Meta::CPAN
$Action::Retry::Strategy::Linear::VERSION = '0.24';
}
# ABSTRACT: Linear incrementation of sleep time strategy
use Moo;
with 'Action::Retry::Strategy';
with 'Action::Retry::Strategy::HelperRole::RetriesLimit';
with 'Action::Retry::Strategy::HelperRole::SleepTimeout';
has initial_sleep_time => (
is => 'ro',
lazy => 1,
default => sub { 1000 },
);
# the current sleep time, as it's computed
has _current_sleep_time => (
lib/Action/Retry/Strategy/Linear.pm view on Meta::CPAN
my ($self) = @_;
$self->_current_sleep_time($self->_current_sleep_time * $self->multiplicator);
return;
}
sub needs_to_retry { 1 }
# Inherited from Action::Retry::Strategy::HelperRole::RetriesLimit
# Inherited from Action::Retry::Strategy::HelperRole::SleepTimeout
1;
__END__
=pod
=encoding UTF-8
t/00-compile.t view on Meta::CPAN
my @module_files = (
'Action/Retry.pm',
'Action/Retry/Strategy.pm',
'Action/Retry/Strategy/Constant.pm',
'Action/Retry/Strategy/Fibonacci.pm',
'Action/Retry/Strategy/HelperRole/RetriesLimit.pm',
'Action/Retry/Strategy/HelperRole/SleepCapping.pm',
'Action/Retry/Strategy/HelperRole/SleepTimeout.pm',
'Action/Retry/Strategy/Linear.pm'
);
# no fake home requested
my $inc_switch = -d 'blib' ? '-Mblib' : '-Ilib';
use File::Spec;
( run in 0.387 second using v1.01-cache-2.11-cpan-a5abf4f5562 )