Retry/Interval/Constant.pm

filter: Statementstmt 100% 18 / 18 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 7 / 7 Podpod n/a totaltotal 100% 25 / 25 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Retry/Interval/API.pm ↑ Summary Retry/Interval/Fibonacci.pm »
1 package AnyEvent::Retry::Interval::Constant;
2 2 ▶BEGIN {
Subroutine BEGIN: called CC=1 SCAR=0.0
3 2 $AnyEvent::Retry::Interval::Constant::VERSION = '0.03';
4 }
5 # ABSTRACT: a constant interval
6 2 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 2 ▶use MooseX::Types::Common::Numeric qw(PositiveNum);
Subroutine BEGIN: called CC=1 SCAR=0.0
8 2 ▶use true;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 2 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 2 with 'AnyEvent::Retry::Interval';
12  
13 2 has 'interval' => (
14 is => 'ro',
15 isa => PositiveNum,
16 default => 1,
17 );
18  
19 14 ▶sub reset {}
Subroutine reset: called CC=1 SCAR=0.0
20  
21 86 ▶sub next {
Subroutine next: called CC=1 SCAR=0.0
22 86 my ($self, $try) = @_;
23 86 return $self->interval;
24 }
25  
26 2 __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__
« Retry/Interval/API.pm ↑ Summary Retry/Interval/Fibonacci.pm »