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   11863 use strict;
  10         30  
  10         546  
4 10     10   55 use warnings;
  10         18  
  10         438  
5 10     10   51 use overload '""'=>\&to_string,fallback=>1;
  10         18  
  10         135  
6              
7 10     10   787 use constant COMMON_RANGE=>0;
  10         18  
  10         1335  
8 10     10   148 use constant START_RANGE=>1;
  10         58  
  10         739  
9 10     10   48 use constant END_RANGE=>2;
  10         16  
  10         474  
10 10     10   50 use constant IS_MISSING=>3;
  10         17  
  10         486  
11 10     10   48 use constant IS_GENERATED=>4;
  10         16  
  10         504  
12              
13 10     10   54 use base qw(Data::Range::Compare::Stream::Result::Base);
  10         16  
  10         26305  
14              
15 1726     1726 1 18094 sub get_common { $_[0]->[COMMON_RANGE] }
16 6     6 1 1200 sub get_common_range { $_[0]->[COMMON_RANGE] }
17 40     40 1 185 sub get_start { $_[0]->[START_RANGE] }
18 4     4 1 25 sub get_start_range { $_[0]->[START_RANGE] }
19 40     40 1 384 sub get_end { $_[0]->[END_RANGE] }
20 4     4 1 25 sub get_end_range { $_[0]->[END_RANGE] }
21 18     18 0 1127 sub is_missing { $_[0]->[$_[0]->IS_MISSING] }
22 34     34 0 274 sub is_generated { $_[0]->[$_[0]->IS_GENERATED] }
23              
24              
25             sub to_string {
26 4     4 1 531 my ($self)=@_;
27 4         10 sprintf 'Commoon Range: [%s] Starting range: [%s] Ending Range: [%s]',$self->get_common,$self->get_start,$self->get_end
28             }
29              
30              
31             1;