Branch Coverage

blib/lib/WARC/Record/Logical/Heuristics.pm
Criterion Covered Total %
branch 72 72 100.0


line true false branch
118 287 237 unless $pieces[$i] =~ /^[0-9]+$/ and length $pieces[$i] < 9
154 22 158 if scalar @files
187 1 15 unless opendir my $dir, $dirname
190 148 1592 if ($filename =~ /$re[$_]/)
226 32 82 if ($fname lt $filename) { }
34 48 elsif ($fname gt $filename) { }
233 27 21 if @before + @after
262 661 224 unless defined $record->field('WARC-Segment-Number') and grep {defined $record->field($_->[0]);} @_
263 266 20 if defined $record->field($_->[0])
54 170 if grep {$record->field($_->[0]) eq $_->[1] if defined $record->field($_->[0]);} @_
268 27 858 if defined $record->{'compression'} and not defined $record->{'sl_packed_size'}
309 1 10 unless defined $initial->field('WARC-Segment-Number')
323 3 7 if $record->field('WARC-Record-ID') eq $origin_id
326 1 6 if $Effort > $Patience
335 3 3 if scalar @nearby
347 1 2 if $record->field('WARC-Record-ID') eq $origin_id
351 1 4 if $Effort > $Patience
362 3 1 if scalar @nearby
376 2 2 if $record->field('WARC-Record-ID') eq $origin_id
380 1 6 if $Effort > $Patience
405 11 27 if defined $_->field('WARC-Segment-Total-Length')
413 62 24 unless defined $total_segment_count
416 15 44 unless $_[$i]
434 21 14 if (UNIVERSAL::isa($clue, 'WARC::Record')) { }
13 1 elsif (ref $clue eq 'ARRAY') { }
435 14 7 unless $clue == $first_segment
438 7 6 if ($tag eq 'tail') { }
3 3 elsif ($tag eq 'files_on_axes') { }
2 1 elsif ($tag eq 'files_from_dir') { }
458 2 12 if &_have_all_segments_p($total_segment_count, @have_segments)
465 4 8 if ($point) { }
7 1 elsif (not $have_tail) { }
477 2 10 if &_have_all_segments_p($total_segment_count, @have_segments) or $Effort > $Patience
499 4 23 if &_have_all_segments_p($total_segment_count, @have_segments) or $Effort > $Patience
507 5 1 unless (@similar_volume_files_before + @similar_volume_files_after)
532 4 29 if &_have_all_segments_p($total_segment_count, @have_segments) or $Effort > $Patience