Branch Coverage

blib/lib/Data/Freq/Field.pm
Criterion Covered Total %
branch 115 134 85.8


line true false branch
43 102 185 if (not ref $input) { }
107 78 elsif (ref $input eq 'HASH') { }
78 0 elsif (ref $input eq 'ARRAY') { }
44 0 102 unless $self->_extract_any($input)
47 206 436 if (defined $$input{$target})
50 0 206 unless $self->$method($$input{$target})
56 44 170 if (defined $$input{$target})
62 1 106 if (defined $$input{$target})
65 0 1 if (ref $$input{$target} ne 'CODE')
72 0 173 unless $self->_extract_any($item)
78 84 203 unless defined $self->type
81 175 112 if ($self->type eq 'text') { }
87 146 141 if ($$self{'sort'} =~ /^(count|score|last)$/) { }
116 129 120 if (defined $self->pos) { }
2 118 elsif (defined $self->key) { }
15 103 elsif ($self->type eq 'date') { }
8 95 elsif ($self->type eq 'number') { }
118 0 129 unless my $array = $record->array
122 0 2 unless my $hash = $record->hash
127 1 7 unless my $array = $record->array
133 1 247 unless defined $result
135 15 232 if ($self->type eq 'date')
136 15 0 looks_like_number $result ? :
137 0 15 unless defined $result
142 1 248 if ($self->convert)
170 11 37 if ($sort eq 'score')
171 8 3 if ($subfield) { }
180 28 20 if ($type ne 'number' and $sort eq 'value') { }
181 26 2 if ($order eq 'asc') { }
182 0 111 unless $$a[1] cmp $$b[1]
184 0 6 unless $$b[1] cmp $$a[1]
187 9 11 if ($order eq 'asc') { }
188 0 28 unless $$a[1] <=> $$b[1]
190 0 28 unless $$b[1] <=> $$a[1]
196 22 26 if (defined $self->offset or defined $self->limit)
197 13 9 defined $self->offset ? :
198 13 9 defined $self->limit ? :
263 275 479 if $self->$method($input)
271 0 308 if ref $input
273 91 217 if (not defined $input or $input eq '' or $input =~ /^texts?$/i) { }
38 179 elsif ($input =~ /^num(ber)?s?$/i) { }
3 176 elsif ($input =~ /\%/) { }
6 170 elsif ($input =~ /^years?$/i) { }
12 158 elsif ($input =~ /^month?s?$/i) { }
39 119 elsif ($input =~ /^(date|day)s?$/i) { }
4 115 elsif ($input =~ /^hours?$/i) { }
4 111 elsif ($input =~ /^minutes?$/i) { }
6 105 elsif ($input =~ /^(seconds?|time)?$/i) { }
314 0 113 if not defined $input or ref $input or $input eq ''
316 4 109 if ($input =~ /^uniq(ue)?$/) { }
4 105 elsif ($input =~ /^max(imum)?$/) { }
4 101 elsif ($input =~ /^min(imum)?$/) { }
6 95 elsif ($input =~ /^av(g|e(rage)?)?$/) { }
335 0 160 if not defined $input or ref $input or $input eq ''
337 49 111 if ($input =~ /^values?$/i) { }
25 86 elsif ($input =~ /^counts?$/i) { }
17 69 elsif ($input =~ /^scores?$/i) { }
21 48 elsif ($input =~ /^(first|occur(rence)?s?)$/i) { }
15 33 elsif ($input =~ /^last$/i) { }
359 0 83 if not defined $input or ref $input or $input eq ''
361 55 28 if ($input =~ /^asc(end(ing)?)?$/i) { }
28 0 elsif ($input =~ /^desc(end(ing)?)?$/i) { }
374 6 281 unless defined $input
376 11 270 if (ref $input eq 'ARRAY') { }
30 240 elsif ($input =~ /^-?\d+$/) { }
391 0 9 unless defined $input
394 3 6 ref $input eq 'ARRAY' ? :