Jonathan Rockway > AnyEvent-Retry-0.03 > AnyEvent::Retry::Interval::Multi

Download:
AnyEvent-Retry-0.03.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  1
View/Report Bugs
Module Version: 0.03   Source  

NAME ^

AnyEvent::Retry::Interval::Multi - combine multiple interval objects into one interval

VERSION ^

version 0.03

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.

syntax highlighting: