Branch Coverage

blib/lib/File/FormatIdentification/Pronom.pm
Criterion Covered Total %
branch 47 106 44.3


line true false branch
37 0 35355 unless (defined $regex)
39 16551 18804 if (not defined $rx) { }
48 0 18804 unless (defined $local_regex)
51 5757 13047 if (0 == $pos_diff) { }
13047 0 elsif ($pos_diff > 0) { }
0 0 elsif ($pos_diff < 0) { }
62 2661 10386 if (scalar @rx_groups > 0 and $rx_groups[0]{'position'} == $rx->{'position'} or $pos_diff > 1) { }
129 111 18693 if (!defined($minoffset) || length $minoffset == 0 and !defined($maxoffset) || length $maxoffset == 0) { }
15243 3450 elsif (defined $minoffset and length $minoffset > 0 and defined $maxoffset and length $maxoffset > 0 and $minoffset == $maxoffset) { }
140 3507 11736 if ($minoffset > 0)
157 3450 0 if (defined $minoffset and length $minoffset > 0)
160 2313 1137 if (defined $maxoffset and length $maxoffset > 0)
165 3408 42 if ($maxtmp >= $mintmp) { }
178 3450 0 if (defined $minoffset and length $minoffset > 0)
186 1134 3303 if ($maxtmp > $maxresidual) { }
0 3303 elsif ($maxtmp < 0) { }
195 0 4437 if ($mintmp > $minresidual) { }
279 4158 elsif ($mintmp < 0) { }
205 3450 987 if ($i == 0) { }
147 840 elsif ($i == $maxloops) { }
221 1137 3300 if (not defined $maxoffset or length $maxoffset == 0)
224 0 4437 if (not defined $minoffset or length $minoffset == 0)
262 4788 8205 if ($fq->localname eq 'LeftFragment') { }
8205 0 elsif ($fq->localname eq 'RightFragment') { }
306 420 5391 if (not defined $dir or length $dir == 0) { }
4782 609 elsif ($dir eq 'BOFoffset') { }
609 0 elsif ($dir eq 'EOFoffset') { }
346 255 4674 if (not defined $reference or 0 == length $reference) { }
4065 609 elsif ($reference eq 'BOFoffset') { }
609 0 elsif ($reference eq 'EOFoffset') { }
459 0 0 if (defined $signatureid)
469 0 0 if (exists $found_signature_ids{$priority_over_sid})
560 0 0 if (defined $sig)
572 0 0 if (defined $sig)
582 0 0 unless (defined $id)
599 0 0 unless (defined $internalid)
618 0 0 unless (defined $internalid)
620 0 0 if (defined $value)
629 0 0 unless (defined $internalid)
648 0 0 unless (defined $internalid)
728 0 0 if (exists $uniq_regexes{$rx})
737 0 0 unless (defined $sigid)
745 0 0 if (0 == scalar @ints) { }
774 0 0 if (defined $best_quality_internal)
794 0 0 if (defined $worst_quality_internal)
853 0 0 unless open my $FH, '>>', "$csv_file"
854 0 0 unless ($file_exists)
861 0 0 unless (defined $result)
889 0 0 if (defined $verbose)
895 0 0 if (defined $verbose)
907 0 0 if (defined $verbose)
917 0 0 if (defined $verbose)
929 0 0 if (defined $verbose)