File Coverage

blib/lib/Data/Range/Compare/Stream/Iterator/Consolidate/Result.pm
Criterion Covered Total %
statement 37 37 100.0
branch n/a
condition n/a
subroutine 18 18 100.0
pod 7 9 77.7
total 62 64 96.8


line stmt bran cond sub pod time code
1             package Data::Range::Compare::Stream::Iterator::Consolidate::Result;
2              
3 10     10   7565 use strict;
  10         26  
  10         269  
4 10     10   51 use warnings;
  10         17  
  10         401  
5 10     10   56 use overload '""'=>\&to_string,fallback=>1;
  10         21  
  10         95  
6              
7 10     10   778 use constant COMMON_RANGE=>0;
  10         21  
  10         590  
8 10     10   111 use constant START_RANGE=>1;
  10         54  
  10         467  
9 10     10   55 use constant END_RANGE=>2;
  10         16  
  10         486  
10 10     10   65 use constant IS_MISSING=>3;
  10         18  
  10         467  
11 10     10   47 use constant IS_GENERATED=>4;
  10         17  
  10         477  
12              
13 10     10   55 use base qw(Data::Range::Compare::Stream::Result::Base);
  10         34  
  10         3485  
14              
15 1726     1726 1 15615 sub get_common { $_[0]->[COMMON_RANGE] }
16 6     6 1 1157 sub get_common_range { $_[0]->[COMMON_RANGE] }
17 40     40 1 154 sub get_start { $_[0]->[START_RANGE] }
18 4     4 1 21 sub get_start_range { $_[0]->[START_RANGE] }
19 40     40 1 221 sub get_end { $_[0]->[END_RANGE] }
20 4     4 1 19 sub get_end_range { $_[0]->[END_RANGE] }
21 18     18 0 1684 sub is_missing { $_[0]->[$_[0]->IS_MISSING] }
22 34     34 0 208 sub is_generated { $_[0]->[$_[0]->IS_GENERATED] }
23              
24              
25             sub to_string {
26 4     4 1 472 my ($self)=@_;
27 4         13 sprintf 'Commoon Range: [%s] Starting range: [%s] Ending Range: [%s]',$self->get_common,$self->get_start,$self->get_end
28             }
29              
30              
31             1;