NAME
AnyEvent::Retry::Interval - role representing a time sequence generator for AnyEvent::Retry
VERSION
version 0.03
METHODS
reset
Reset the sequence generator to its initial state.
reset
accepts no arguments.
next
Return the next element in the sequence. In scalar context, return only the next element. In list context, return a pair of the next element and the number of times next
has been called since reset
.
next
accepts no arguments.
IMPLEMENTING YOUR OWN INTERVAL CLASS
Consume this role.
Your next
method only needs to return the next value in the sequence; the list context behavior is automatically added when you consume this role. It is automatically passed the counter as the only argument, which is 1
the first time after a reset.
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.