line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package AnyEvent::Retry::Interval::Constant; |
2
|
|
|
|
|
|
|
BEGIN { |
3
|
2
|
|
|
2
|
|
29087
|
$AnyEvent::Retry::Interval::Constant::VERSION = '0.03'; |
4
|
|
|
|
|
|
|
} |
5
|
|
|
|
|
|
|
# ABSTRACT: a constant interval |
6
|
2
|
|
|
2
|
|
2084
|
use Moose; |
|
2
|
|
|
|
|
760139
|
|
|
2
|
|
|
|
|
20
|
|
7
|
2
|
|
|
2
|
|
24084
|
use MooseX::Types::Common::Numeric qw(PositiveNum); |
|
2
|
|
|
|
|
189899
|
|
|
2
|
|
|
|
|
22
|
|
8
|
2
|
|
|
2
|
|
6099
|
use true; |
|
2
|
|
|
|
|
43469
|
|
|
2
|
|
|
|
|
17
|
|
9
|
2
|
|
|
2
|
|
2379
|
use namespace::autoclean; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
20
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
with 'AnyEvent::Retry::Interval'; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
has 'interval' => ( |
14
|
|
|
|
|
|
|
is => 'ro', |
15
|
|
|
|
|
|
|
isa => PositiveNum, |
16
|
|
|
|
|
|
|
default => 1, |
17
|
|
|
|
|
|
|
); |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub reset {} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub next { |
22
|
|
|
|
|
|
|
my ($self, $try) = @_; |
23
|
|
|
|
|
|
|
return $self->interval; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
=pod |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=head1 NAME |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
AnyEvent::Retry::Interval::Constant - a constant interval |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=head1 VERSION |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
version 0.03 |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=head1 SYNOPSIS |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
Always wait 42 seconds: |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
my $i = AnyEvent::Retry::Interval::Constant->new( interval => 42 ); |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=head1 AUTHOR |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
Jonathan Rockway <jrockway@cpan.org> |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
This software is copyright (c) 2010 by Jonathan Rockway. |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
55
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=cut |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
__END__ |
61
|
|
|
|
|
|
|
|