Branch Coverage

blib/lib/Biblio/Citation/Compare.pm
Criterion Covered Total %
branch 59 102 57.8


line true false branch
77 6 36 if ($#$list2 > $#$list1)
83 2 47 unless grep {samePerson($$list2[$i], $_);} @$list1
91 0 0 if ($#$a > -1) { }
103 36 0 unless defined $loose
104 36 0 unless $threshold
106 0 36 if ($debug)
111 0 0 if (defined $$e{'doi'} and length $$e{'doi'} and defined $$c{'doi'} and length $$c{'doi'})
112 0 0 if $$e{'doi'} eq $$c{'doi'}
115 0 36 unless $c
122 7 29 lc $$e{'title'} eq lc $$c{'title'} ? :
124 28 8 defined $$e{'date'} && defined $$c{'date'} && $$e{'date'} eq $$c{'date'} ? :
126 0 36 if ($debug)
132 7 0 if $tsame and $asame and $dsame
135 0 29 unless ($asame)
138 0 0 if $debug
142 0 29 if $debug
144 0 10 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/)
153 29 0 unless ($nolinks)
157 0 0 if grep {$l eq $_;} @{$$c{'links'};}
163 7 0 if (not $dsame and defined $$e{'date'} and defined $$c{'date'} and $$e{'date'} =~ /^\d\d\d\d$/ and $$c{'date'} =~ /^\d\d\d\d$/)
167 0 7 if ($$e{'title'} =~ /^Introduction.?$/ or $$e{'title'} =~ /^Preface.?$/)
168 0 0 if $$e{'source'} and $$e{'source'} ne $$c{'source'} or $$e{'volume'} and $$e{'volume'} ne $$c{'volume'}
171 0 7 if ($loose) { }
179 21 8 if ($asame and $compat_dates)
183 0 29 if $debug
197 0 29 if $debug
198 0 29 if $debug
200 3 25 if $ed1 and not $ed2 or $ed2 and not $ed1 or $ed1 and $ed1 != $ed2
201 0 25 if $debug
209 1 4 if $parens1 and $parens2 and numdiff($parens1, $parens2)
211 0 24 if $debug
213 0 24 if $debug
215 2 22 if numdiff($str1, $str2)
222 0 22 if $debug
224 13 9 if $score < $threshold
227 7 2 if ($loose)
229 0 7 if $debug
230 0 7 if my_dist_text($str1, $str2) / (length($str1) + 1) < $threshold
232 5 2 if ($$e{'title'} =~ /(.+)\s*$TITLE_SPLIT\s*(.+)/) { }
2 0 elsif ($$c{'title'} =~ /(.+)\s*$TITLE_SPLIT\s*(.+)/) { }
235 0 5 if ($$c{'title'} =~ /(.+)\s*$TITLE_SPLIT\s*(.+)/) { }
238 5 0 if (my_dist_text($str1, $str2) / (length($str1) + 1) < $threshold)
246 1 1 if (my_dist_text($str1, $str2) / (length($str1) + 1) < $threshold)
293 11 6 if ($s =~ /\b(\d+)/)
297 6 56 if ($s =~ /\b$n\b/i)
307 17 236 if ($s =~ /$re/i)
321 2 27 if $#n1 ne $#n2
323 3 2 if lc $n1[$_] ne lc $n2[$_]
353 0 0 if (substr($in, 0, 1) eq '#') { }
354 0 0 substr($in, 1, 1) eq 'x' ? :
356 0 0 $num < 127 || $num > 159 ? :