NAME
AnyEvent::Retry::Interval::Multi - combine multiple interval objects into one interval
VERSION
version 0.02
SYNOPSIS
my $m = AnyEvent::Retry::Interval::Multi->new(
first => { Constant => { interval => .5 } },
after => -2,
then => { Multi => {
first => 'Fibonacci',
after => 10,
then => { Multi => {
first => { Constant => { interval => 10 } },
after => -6,
then => { Constant => { interval => 60 } },
}},
}},
);
$m
waits for .5 seconds twice, then it waits for 1 second, 1 second, 2 seconds, 3 seconds, 5 seconds, 8 seconds, then 10 seconds 6 times, then 60 seconds forever.
DESCRIPTION
See the code and tests for more detail.
AUTHOR
Jonathan Rockway <jrockway@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2010 by Jonathan Rockway.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.