Branch Coverage

lib/String/Fuzzy.pm
Criterion Covered Total %
branch 76 128 59.3


line true false branch
47 0 2 exists $opts{'normalize'} ? :
50 1 1 if not defined $query && defined $choices or ref $choices ne "ARRAY"
66 0 2 exists $opts{'normalize'} ? :
69 1 1 if not defined $query && defined $choices or ref $choices ne "ARRAY"
78 1 0 $limit == 1 ? :
84 0 2 exists $opts{'normalize'} ? :
87 0 2 if (ref $needle and not overload::Method($needle, '""')) { }
0 4 elsif (ref $haystack and not overload::Method($haystack, '""')) { }
96 2 0 defined $needle ? :
0 0 defined $needle ? :
2 0 $normalize ? :
97 2 0 defined $haystack ? :
0 0 defined $haystack ? :
2 0 $normalize ? :
101 0 2 if $nlen == 0 or $hlen == 0
107 0 10 if $window < 3 or $window > $hlen
112 8 327 if $score > $max_score
122 1 3 exists $opts{'normalize'} ? :
125 0 4 if (ref $s1 and not overload::Method($s1, '""')) { }
0 8 elsif (ref $s2 and not overload::Method($s2, '""')) { }
134 3 0 defined $s1 ? :
1 0 defined $s1 ? :
3 1 $normalize ? :
135 3 0 defined $s2 ? :
1 0 defined $s2 ? :
3 1 $normalize ? :
137 0 4 if length $str1 > length $str2
138 0 4 if length $str1 == 0
145 1 3 if (index($str2, $str1) != -1)
164 371 13 exists $opts{'normalize'} ? :
167 1 383 if (ref $s1 and not overload::Method($s1, '""')) { }
0 766 elsif (ref $s2 and not overload::Method($s2, '""')) { }
176 35 1 defined $s1 ? :
347 0 defined $s1 ? :
36 347 $normalize ? :
177 35 1 defined $s2 ? :
347 0 defined $s2 ? :
36 347 $normalize ? :
179 9 374 if $str1 eq $str2
180 3 371 unless length($str1 // "") and length($str2 // "")
183 336 7 &is_utf8($str1) ? :
0 343 &is_utf8($str2) ? :
28 343 $normalize ? :
193 0 1 exists $opts{'normalize'} ? :
196 0 1 if (ref $s1 and not overload::Method($s1, '""')) { }
0 2 elsif (ref $s2 and not overload::Method($s2, '""')) { }
205 1 0 defined $s1 ? :
0 0 defined $s1 ? :
1 0 $normalize ? :
206 1 0 defined $s2 ? :
0 0 defined $s2 ? :
1 0 $normalize ? :
214 2 0 unless not $count{$_}
215 2 0 unless not $count{$_}
231 0 1 exists $opts{'normalize'} ? :
234 0 1 if (ref $s1 and not overload::Method($s1, '""')) { }
0 2 elsif (ref $s2 and not overload::Method($s2, '""')) { }
243 1 0 defined $s1 ? :
0 0 defined $s1 ? :
1 0 $normalize ? :
244 1 0 defined $s2 ? :
0 0 defined $s2 ? :
1 0 $normalize ? :
254 2 84 unless defined $str