Branch Coverage

blib/lib/Biblio/Citation/Compare.pm
Criterion Covered Total %
branch 75 118 63.5


line true false branch
77 6 7 if $#$list1 != $#$list2 and $opts{'strict'}
78 6 54 if ($#$list2 > $#$list1)
84 4 47 unless grep {samePerson($list2->[$i], $_, %opts);} @$list1
92 0 0 if ($#$a > -1) { }
105 53 0 unless defined $loose
106 53 0 unless $threshold
107 0 53 if $loose
109 0 53 if ($debug)
114 0 0 if (defined $e->{'doi'} and length $e->{'doi'} and defined $c->{'doi'} and length $c->{'doi'})
115 0 0 if ($e->{'doi'} eq $c->{'doi'}) { }
118 0 0 if $e->{'doi'} eq $c->{'doi'}
126 0 53 unless $c
133 7 46 lc $e->{'title'} eq lc $c->{'title'} ? :
137 29 24 defined $e->{'date'} && defined $c->{'date'} && $e->{'date'} eq $c->{'date'} ? :
139 0 53 if ($debug)
147 5 2 if $tsame and $asame and $dsame
150 1 47 unless ($asame_bits)
151 0 1 if $debug
159 24 23 if (not $dsame || $compat_dates) { }
162 0 24 if ($e->{'title'} =~ /^Introduction.?$/ or $e->{'title'} =~ /^Preface.?$/)
164 0 0 if $e->{'source'} and $e->{'source'} ne $c->{'source'} or $e->{'volume'} and $e->{'volume'} ne $c->{'volume'}
168 7 17 if ($e->{'date'} and $e->{'date'} =~ /^\d\d\d\d$/ and $c->{'date'} and $c->{'date'} =~ /^\d\d\d\d$/) { }
174 3 4 if ($date_diff > 3 or $date_diff < -3) { }
175 3 0 if ($asame_bits) { }
177 0 3 if $debug
179 0 0 if $debug
194 23 0 if $asame_loose or $asame_bits
200 0 47 if $debug
207 0 15 if not $tsame and (abs length($e->{'title'}) - length($c->{'title'}) > 20 and not $e->{'title'} =~ /$TITLE_SPLIT/ || $c->{'title'} =~ /$TITLE_SPLIT/ and not $e->{'title'} =~ /$PARENS/ || $c->{'title'} =~ /$PARENS/)
219 0 47 if $debug
233 0 47 if $debug
234 0 47 if $debug
235 2 1 if $ed1 and $ed2 and $ed1 == $ed2 and not $dsame and $asame_loose
237 6 40 if $ed1 and not $ed2 or $ed2 and not $ed1 or $ed1 and $ed1 != $ed2
238 0 40 if $debug
246 2 8 if $parens1 and $parens2 and numdiff($parens1, $parens2)
248 0 38 if $debug
250 0 38 if $debug
252 5 33 if numdiff($str1, $str2)
259 0 33 if $debug
261 22 11 if $score < $threshold
264 7 4 if ($loose)
266 0 7 if $debug
268 5 2 if ($e->{'title'} =~ /(.+?)\s*$TITLE_SPLIT\s*(.+)/) { }
2 0 elsif ($c->{'title'} =~ /(.+?)\s*$TITLE_SPLIT\s*(.+)/) { }
271 0 5 if ($c->{'title'} =~ /(.+?)\s*$TITLE_SPLIT\s*(.+)/) { }
274 5 0 if (my_dist_text($str1, $str2) / (length($str1) + 1) < $threshold)
282 1 1 if (my_dist_text($str1, $str2) / (length($str1) + 1) < $threshold)
323 0 3 if $#alist != $#blist
325 2 4 if lc $alist[$i] ne lc $blist[$i]
370 13 15 if ($s =~ /\b(\d+)/)
373 10 5 if (isroman($s))
378 5 30 if ($s =~ /\b$n\b/i)
389 28 363 if ($s =~ /$re/i)
402 4 44 if $#n1 ne $#n2
404 7 6 if lc $n1[$_] ne lc $n2[$_]
426 0 0 if (substr($in, 0, 1) eq '#') { }
427 0 0 substr($in, 1, 1) eq 'x' ? :
431 0 0 $num < 127 || $num > 159 ? :