Branch Coverage

blib/lib/WARC/Index/File/CDX.pm
Criterion Covered Total %
branch 53 54 98.1


line true false branch
66 1 12 unless open my $cdx, '<', $cdx_file
70 1 11 unless defined $header
75 2 9 unless 'CDX' eq substr($header, 1, 3) and $delimiter eq substr($header, 4, 1)
87 1 8 unless defined $field_index{'g'}
89 1 7 unless defined $field_index{'v'} or defined $field_index{'V'}
99 77 6 if defined $self->{'volumes'}{$name}
119 12 83 unless $entry_length
131 4 79 $volname =~ /[.]w?arc$/ ? :
19 52 defined $CDX_Import_Map{$_} ? :
141 4 12 if $key eq 'url_prefix'
151 1 13 unless open my $cdx, '<', $self->{'cdx_file'}
157 6 7 unless defined $entry->distance(@_)
160 11 17 unless 0 > $entry->distance(@_)
175 1 17 unless open my $cdx, '<', $self->{'cdx_file'}
181 6 11 unless defined $entry->distance(@_)
185 19 12 unless (0 > $distance)
186 16 3 if ($result_distance < 0 or $distance < $result_distance)
190 9 22 if $result_distance == 0
201 1 34 unless (defined wantarray)
204 1 33 unless scalar @_
206 1 32 if scalar @_ % 2
209 14 18 if (wantarray) { }
218 1 3 unless open my $cdx, '<', $self->{'cdx_file'}
232 1 14 unless open my $cdx, '<', $self->{'cdx_file'}
236 1 13 unless seek $cdx, $offset - 1, 0
237 0 13 unless defined read($cdx, $eol, 1)
238 1 12 unless $eol eq $/