Branch Coverage

blib/lib/String/Approx.pm
Criterion Covered Total %
branch 125 188 66.4


line true false branch
29 0 7 if $CACHE_N_PURGE < 1
36 0 0 if (@_ == 0) { }
41 0 0 if $CACHE_MAX < 0
46 0 0 if (@_ == 0) { }
51 0 0 if ($CACHE_PURGE < 0) { }
0 0 elsif ($CACHE_PURGE > 1) { }
82 41 0 if ($CACHE_MAX)
83 28 13 unless exists $_simple{$P}
87 0 41 if (keys %_simple_usage_count > $CACHE_MAX)
104 33 25 if (s/^([IDS]\s*)?(\d+)(\s*%)?//) { }
5 20 elsif (s/^initial_position\W+(\d+)\b//) { }
4 16 elsif (s/^final_position\W+(\d+)\b//) { }
0 16 elsif (s/^position_range\W+(\d+)\b//) { }
5 11 elsif (s/^minimal_distance\b//) { }
7 4 elsif (s/^i//) { }
3 1 elsif (s/^g//) { }
1 0 elsif (s/^\?//) { }
105 5 3 $2 ? :
8 25 defined $3 ? :
107 14 19 if (defined $1) { }
167 40 44 if (exists $_param_key{$param}) { }
177 84 0 if ($CACHE_MAX)
178 37 47 if (exists $_complex{$P}{$_param_key})
183 47 37 unless (defined $complex)
184 19 28 if (exists $param{'k'}) { }
189 47 0 if $CACHE_MAX
193 47 37 if ($is_new)
194 46 1 unless exists $param{'?'}
197 8 39 if exists $param{'I'}
199 3 44 if exists $param{'D'}
201 3 44 if exists $param{'S'}
204 7 40 if exists $param{'i'}
207 5 42 if exists $param{'initial_position'}
210 4 43 if exists $param{'final_position'}
213 0 47 if exists $param{'position_range'}
216 8 39 if exists $param{'minimal_distance'}
219 84 0 if ($CACHE_MAX)
223 0 84 if (scalar keys %_complex_usage_count > $CACHE_MAX)
245 3 45 unless length $P
247 27 18 @_ && ref $_[0] eq 'ARRAY' ? :
249 41 4 if (@_)
250 12 29 if (wantarray) { }
254 21 8 if $a->match($_)
259 3 1 if (defined $_)
260 0 3 if (wantarray) { }
261 0 0 $a->match($_) ? :
263 1 2 if $a->match($_)
266 2 1 if defined $_
309 7 4 @_ && ref $_[0] eq 'ARRAY' ? :
313 9 2 if (@_) { }
1 1 elsif (defined $_) { }
314 1 8 if (exists $p{'g'}) { }
318 12 0 if (defined $i)
322 11 18 if @n
328 104 128 if (defined $i)
336 0 1 if (exists $p{'g'}) { }
338 0 0 if (defined $i)
342 0 0 if @n
345 1 0 if (defined $i)
359 2 21 unless length $P
361 7 14 @_ && ref $_[0] eq 'ARRAY' ? :
365 21 0 if (@_)
366 0 21 if (wantarray) { }
372 0 0 if defined $_
380 0 45 unless length $P
382 43 2 @_ && ref $_[0] eq 'ARRAY' ? :
386 45 0 if (@_)
389 0 0 if defined $_
401 35 4 $l0 <= $l1 ? :
407 2 17 if (length $a0 == 0)
410 2 15 if (length $a1 == 0)
413 0 15 ref $_[0] eq 'ARRAY' ? :
414 6 9 if (ref $a0 eq 'ARRAY') { }
1 8 elsif (ref $a1 eq 'ARRAY') { }
415 1 5 if (ref $a1 eq 'ARRAY') { }
423 1 7 if (wantarray) { }
434 0 4 ref $_[0] eq 'ARRAY' ? :
435 0 4 if (ref $a0 eq 'ARRAY') { }
0 4 elsif (ref $a1 eq 'ARRAY') { }
436 0 0 if (ref $a1 eq 'ARRAY') { }
439 0 0 $l0 ? :
443 0 0 $l0 ? :
448 0 0 unless $l0
452 1 3 if (wantarray) { }
453 2 0 $l0 ? :
455 0 3 unless $l0
472 0 3 unless $l
475 0 3 @_ && ref $_[0] eq 'ARRAY' ? :
479 3 0 if (@_)
480 0 3 if (wantarray) { }
483 0 0 $aindex == -1 ? :
487 0 3 $aindex == -1 ? :
490 0 0 if (defined $_)
492 0 0 $aindex == -1 ? :