Branch Coverage

blib/lib/Complete/Util.pm
Criterion Covered Total %
branch 160 224 71.4


line true false branch
94 0 0 unless defined $ans
95 0 0 if (ref $ans ne "HASH")
98 0 0 if (@_)
127 0 0 unless defined $ans
128 0 0 if (ref $ans eq "HASH")
155 0 7 unless defined $ans
156 4 3 ref $ans eq 'HASH' ? :
180 0 5 unless defined $ans
181 1 2 @{$ans->{'words'} // [];} ? :
1 1 @$ans ? :
3 2 ref $ans eq 'HASH' ? :
187 3 9 if $_ < $m
208 0 0 $a[$i - 1] eq $b[$j - 1] ? :
304 0 46 unless my $array0 = $args{'array'}
314 0 46 if $COMPLETE_UTIL_TRACE
319 1 45 unless (@$array0)
324 3 42 $ci ? :
3 42 if $map_case
327 3 42 if ($args{'exclude'})
330 3 4 $ci ? :
1 6 if $map_case
337 4 41 if (my $rmap = $args{'replace_map'})
341 1 3 $ci ? :
0 4 if $map_case
344 1 3 $ci ? :
0 4 if $map_case
361 0 45 if $COMPLETE_UTIL_TRACE
364 18 160 $ci ? :
10 168 if $map_case
365 5 13 if $excluden and $excluden->{$eln}
368 18 155 if $summaries
369 60 113 if (0 == index($eln, $wordn))
371 10 50 if $summaries
373 4 10 if ($rmapn and $rmapn->{$eln})
379 3 1 if (0 == index($vn, $wordn))
381 0 3 if $summaries
386 0 31 if @words and $COMPLETE_UTIL_TRACE
390 43 2 unless $word_mode and not @words
392 1 1 if $wordn =~ /\A\W/
393 0 2 unless @split_wordn > 1
396 2 2 if $i
400 0 2 if $COMPLETE_UTIL_TRACE
405 4 4 if ($arrayn[$i] =~ /$re/)
411 0 4 if ($tmp =~ s/([a-z0-9_])([A-Z])/$1-$2/g)
412 0 0 if $ci
0 0 if $map_case
413 0 0 if ($tmp =~ /$re/)
419 4 4 unless $match
421 0 4 if $summaries
423 0 2 if @words and $COMPLETE_UTIL_TRACE
427 4 0 if ($char_mode and not @words and length $wordn and length $wordn <= 7)
430 0 4 if $COMPLETE_UTIL_TRACE
432 1 15 if ($arrayn[$i] =~ /$re/)
434 0 1 if $summaries
437 0 1 if @words and $COMPLETE_UTIL_TRACE
441 3 0 if ($char_mode and not @words and length $wordn and length $wordn <= 7)
444 0 3 if $COMPLETE_UTIL_TRACE
446 2 11 if ($arrayn[$i] =~ /$re/)
448 0 2 if $summaries
451 0 2 if @words and $COMPLETE_UTIL_TRACE
455 1 44 if ($fuzzy and not @words)
456 0 1 if $COMPLETE_UTIL_TRACE
459 0 1 if ($env eq 'xs') { }
0 1 elsif ($env eq 'flexible') { }
0 1 elsif ($env eq 'pp') { }
1 0 elsif (eval { do { require Text::Levenshtein::Flexible; 1 } }) { }
493 0 3 if $l <= 0
500 0 3 if (defined $editdists{$chopped}) { }
501 3 0 if ($editdist_flex) { }
503 2 1 unless defined $d
512 0 1 unless $d <= $maxd
514 0 1 if $summaries
518 0 1 if @words and $COMPLETE_UTIL_TRACE
522 4 41 if ($rmapn and @words)
525 1 3 $ci ? :
0 4 if $map_case
529 3 1 if (my $w = $$rev_rmapn{$wordsn[$i]})
538 10 61 $summaries ? :
543 1 46 $ci ? :
549 0 46 if $COMPLETE_UTIL_TRACE
574 0 4 unless my $hash = $args{'hash'}
582 1 3 if ($summaries) { }
1 2 elsif ($summaries_from_hash_values) { }
681 0 19 unless my $elems = delete $args{'elems'}
688 17 2 @mentioned_elems ? :
691 3 16 if ($remaining) { }
6 10 elsif ($uniq) { }
697 0 10 if ($ci) { }
700 0 18 $ci ? :
9 9 unless $ci ? $mem{lc $_} : $mem{$_}
713 14 5 if @mentioned_elems
718 14 5 unless @$cae_res == 1
719 1 4 if @$remaining_elems <= 1
773 1 9 unless @_
774 1 8 if @_ < 2
786 8 67 ref $entry ? :
4 71 ref $_ ? :
787 29 5 unless &List::Util::first(sub { (ref $entry ? $entry->{'word'} : $entry) eq (ref $_ ? $_->{'word'} : $_); } , @{$$final{"words"};})
794 9 11 if (ref $ans eq 'ARRAY') { }
11 0 elsif (ref $ans eq 'HASH') { }
799 3 8 if ($ans->{'final'})
806 8 9 if ($_ eq 'words') { }
6 3 elsif ($_ eq 'static') { }
809 4 2 if (exists $final->{$_}) { }
821 6 2 $encounter_hash ? :
849 1 2 ref $answer eq 'HASH' ? :
851 3 0 if (defined(my $prefix = $args{'prefix'}))
853 1 8 if (ref $_ eq 'HASH') { }
860 3 0 if (defined(my $suffix = $args{'suffix'}))
862 1 8 if (ref $_ eq 'HASH') { }
898 0 0 ref $answer eq 'HASH' ? :
900 0 0 if (@$words == 1)