File Coverage

blib/lib/Number/Tolerant/Type/infinite.pm
Criterion Covered Total %
statement 17 17 100.0
branch 4 4 100.0
condition 6 6 100.0
subroutine 6 6 100.0
pod 3 3 100.0
total 36 36 100.0


line stmt bran cond sub pod time code
1 25     25   182 use strict;
  25         76  
  25         1287  
2 25     25   157 use warnings;
  25         51  
  25         2186  
3             # ABSTRACT: an infinite tolerance
4              
5             package
6             Number::Tolerant::Type::infinite;
7 25     25   150 use parent qw(Number::Tolerant::Type);
  25         52  
  25         183  
8              
9 7     7 1 13 sub construct { shift; { value => 0 } }
  7         30  
10              
11             sub parse {
12 23     23 1 65 my ($self, $string, $factory) = @_;
13 23 100       94 return $factory->new('infinite') if $string =~ m!\Aany\s+number\z!;
14 22         76 return;
15             }
16              
17 71     71 1 135 sub valid_args { shift;
18 71 100 100     417 return ($_[0]) if @_ == 1 and defined $_[0] and $_[0] eq 'infinite';
      100        
19 64         211 return;
20             }
21              
22             1;
23              
24             __END__