Branch Coverage

blib/lib/HiveJSO.pm
Criterion Covered Total %
branch 71 80 88.7


line true false branch
70 1 25 if (scalar @args == 1) { }
84 12 70 if (defined $short_attributes{$k}) { }
28 42 elsif (grep {$k eq $short_attributes{$_};} keys %short_attributes) { }
18 24 elsif (grep {$_ eq $k;} @long_attributes) { }
85 0 12 if $long
90 0 28 if $short
95 23 1 if ($k eq 'original_json') { }
111 1 24 if (keys %orig < 2)
118 1 23 if (defined $attr{'ok'} and $attr{'ok'} != 1)
125 5 18 if (defined $attr{'data'})
126 0 5 unless ref $attr{'data'} eq 'ARRAY'
128 1 6 unless ref $data_set eq 'ARRAY'
129 1 5 unless scalar @{$data_set;}
130 1 4 unless $$data_set[0] > 0
137 1 19 if (defined $attr{'error_code'})
138 1 0 unless $attr{'error_code'} > 0
144 6 13 if ($checksum)
146 1 5 unless ($calced_checksum == $checksum)
157 22 0 if $_ ne 'checksum'
165 3 25 if (ref $value eq 'ARRAY')
207 3 60 $self->can('has_' . $_)->($self) ? :
209 63 6 if $_ ne 'unit_id' and $_ ne 'checksum'
223 2 40 $self->can('has_' . $_)->($self) ? :
226 42 4 if $_ ne 'unit_id' and $_ ne 'checksum'
232 0 42 if ($short_data{$short_attributes{$k}})
273 1 2 if (ref $parsed[0]) { }
1 1 elsif (scalar @parsed == 1) { }
288 1 14 defined $current ? :
291 1 14 if $start == -1
293 4 10 if $end == -1
296 9 1 if ($another_start == -1) { }
297 4 5 $start == 0 ? :
304 0 1 if defined $current and $another_start == $current
313 9 5 if (@parse_first) { }
315 5 4 if $pre and length $pre
320 2 7 if ($@)
327 2 6 $one ? :
8 1 if $post and length $post
340 0 1 $self->has_checksum ? :
352 1 0 $self->has_checksum ? :