Branch Coverage

blib/lib/Complete/Util.pm
Criterion Covered Total %
branch 171 240 71.2


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 48 unless my $array0 = $args{'array'}
314 0 48 if $COMPLETE_UTIL_TRACE
319 1 47 unless (@$array0)
324 3 44 $ci ? :
3 44 if $map_case
327 3 44 if ($args{'exclude'})
330 3 4 $ci ? :
1 6 if $map_case
337 4 43 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 47 if $COMPLETE_UTIL_TRACE
364 18 165 $ci ? :
10 173 if $map_case
365 5 13 if $excluden and $excluden->{$eln}
368 23 155 if $summaries
369 65 113 if (0 == index($eln, $wordn))
371 15 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 33 if @words and $COMPLETE_UTIL_TRACE
390 45 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 46 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 43 if ($rmapn and @words)
525 1 3 $ci ? :
0 4 if $map_case
529 3 1 if (my $w = $$rev_rmapn{$wordsn[$i]})
538 15 61 $summaries ? :
543 1 49 $ci ? :
549 0 48 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 21 unless my $elems = delete $args{'elems'}
691 19 2 unless $summaries
695 0 7 $ci ? :
696 0 7 if (exists $summaries_for{$elem})
705 19 2 @mentioned_elems ? :
708 4 17 if ($remaining) { }
6 11 elsif ($uniq) { }
714 0 10 if ($ci) { }
717 0 18 $ci ? :
9 9 unless $ci ? $mem{lc $_} : $mem{$_}
727 0 5 $ci ? :
2 19 $summaries ? :
731 16 5 if @mentioned_elems
732 5 31 ref $_ eq 'HASH' ? :
736 16 5 unless @$cae_res == 1
737 1 4 if @$remaining_elems <= 1
738 4 0 unless ref $cae_res->[0] eq "HASH"
739 0 4 defined $cae_res->[0]{'summary'} ? :
792 1 9 unless @_
793 1 8 if @_ < 2
805 8 67 ref $entry ? :
4 71 ref $_ ? :
806 29 5 unless &List::Util::first(sub { (ref $entry ? $entry->{'word'} : $entry) eq (ref $_ ? $_->{'word'} : $_); } , @{$$final{"words"};})
813 9 11 if (ref $ans eq 'ARRAY') { }
11 0 elsif (ref $ans eq 'HASH') { }
818 3 8 if ($ans->{'final'})
825 8 9 if ($_ eq 'words') { }
6 3 elsif ($_ eq 'static') { }
828 4 2 if (exists $final->{$_}) { }
840 6 2 $encounter_hash ? :
868 1 2 ref $answer eq 'HASH' ? :
870 3 0 if (defined(my $prefix = $args{'prefix'}))
872 1 8 if (ref $_ eq 'HASH') { }
879 3 0 if (defined(my $suffix = $args{'suffix'}))
881 1 8 if (ref $_ eq 'HASH') { }
917 0 0 ref $answer eq 'HASH' ? :
919 0 0 if (@$words == 1)