Branch Coverage

blib/lib/WARC/Index/Volatile.pm
Criterion Covered Total %
branch 69 70 98.5


line true false branch
63 1 12 unless (defined wantarray)
68 10 7 if ($key eq 'from') { }
6 1 elsif ($key eq 'columns') { }
69 8 2 if (UNIVERSAL::isa($_[0], 'ARRAY')) { }
77 1 10 if grep((!defined($_dvmap->{$_})), @columns)
102 1 56 unless (defined wantarray)
105 1 55 unless scalar @_
107 1 54 if scalar @_ % 2
112 2 69 if ref $self->{'by'}{$_[$i]} eq 'ARRAY'
114 51 3 if ref $self->{'by'}{$_[$i]} eq 'HASH'
115 1 53 unless $key
121 51 2 if ($mode eq 'exact') { }
1 1 elsif ($mode eq 'prefix') { }
127 49 3 if (wantarray) { }
133 10 3 unless (0 > $distance)
134 4 6 if ($result_distance < 0 or $distance < $result_distance)
138 2 11 if $result_distance == 0
158 13 231 unless defined $index->{'volume_position_by_tag'}{$voltag}
169 15 353 unless defined $entry->value($refkey)
170 306 47 if (ref $index->{'by'}{$key} eq 'HASH') { }
46 1 elsif (ref $index->{'by'}{$key} eq 'ARRAY') { }
189 5 213 if defined $index->{'entry_position_by_tag_offset'}{$voltag}{$offset}
198 0 213 if exists $index->{'by'}{'segment_origin_id'} and $record->type eq 'continuation'
201 115 98 if exists $index->{'by'}{'url'} || exists $index->{'by'}{'url_prefix'} and defined $record->field('WARC-Target-URI')
217 25 26 if (grep((!defined($source->value($_))), keys %{$$index{'by'};})) { }
230 1 25 if defined $index->{'entry_position_by_tag_offset'}{$voltag}{$offset}
249 10 7 if (not ref $_) { }
253 2 5 if ($_->isa('WARC::Volume')) { }
2 3 elsif ($_->isa('WARC::Index')) { }
1 2 elsif ($_->isa('WARC::Index::Entry')) { }
1 1 elsif ($_->isa('WARC::Record::FromVolume')) { }
263 21 2 unless ref $self->{'by'}{$key} eq 'ARRAY'
302 198 10 if defined $next
305 2 8 if defined $nextvol
314 1 1197 if $key =~ /^_/