Branch Coverage

blib/lib/Perinci/Sub/Complete.pm
Criterion Covered Total %
branch 97 202 48.0


line true false branch
150 0 7 unless (my $meta = $args{'meta'})
154 0 7 unless (my $arg = $args{'arg'})
163 0 7 unless (my $arg_spec = $args_prop->{$arg})
175 2 5 if ($comp)
180 0 5 if ($xcomp)
181 0 0 if (ref $xcomp eq 'CODE') { }
185 0 0 if (ref $xcomp eq 'ARRAY') { }
194 0 0 if (Module::Installed::Tiny::module_installed($mod)) { }
205 0 0 if ($comp)
211 0 5 if ($ent)
214 0 0 if (Module::Installed::Tiny::module_installed($mod)) { }
218 0 0 if (defined &{"${mod}::complete_arg_val";}) { }
231 2 5 if ($comp)
232 2 0 if (ref $comp eq 'CODE') { }
0 0 elsif (ref $comp eq 'ARRAY') { }
249 0 0 if ($args{'riap_client'} and $args{'riap_server_url'})
256 0 0 if ($res->[0] != 200)
272 4 1 unless ($egs)
279 1 1 if (ref $eg eq 'HASH') { }
280 0 1 unless defined $eg->{'value'}
281 0 1 if ref $eg->{'value'}
285 0 1 unless defined $eg
286 0 1 if ref $eg
300 0 5 unless ($sch)
316 0 7 if $@
317 0 7 unless ($fres)
323 1 2 $static && $word eq '' ? :
356 0 3 unless (my $meta = $args{'meta'})
360 0 3 unless (my $arg = $args{'arg'})
364 0 3 unless (defined(my $index = $args{'index'}))
373 0 3 unless (my $arg_spec = $args_prop->{$arg})
385 2 1 if ($elcomp)
390 0 1 if ($xelcomp)
391 0 0 if (ref $xelcomp eq 'CODE') { }
395 0 0 if (ref $xelcomp eq 'ARRAY') { }
404 0 0 if (Module::Installed::Tiny::module_installed($mod)) { }
415 0 0 if ($elcomp)
421 0 1 if ($ent)
424 0 0 if (Module::Installed::Tiny::module_installed($mod)) { }
428 0 0 if (defined &{"${mod}::complete_arg_val";}) { }
442 2 1 if ($elcomp)
443 2 0 if (ref $elcomp eq 'CODE') { }
0 0 elsif (ref $elcomp eq 'ARRAY') { }
460 0 0 if ($args{'riap_client'} and $args{'riap_server_url'})
468 0 0 if ($res->[0] != 200)
481 0 1 unless ($sch)
489 0 1 if ($type ne "array")
494 0 1 unless ($cs->{'of'})
508 0 3 if $@
509 0 3 unless ($fres)
515 0 2 $static && $word eq '' ? :
598 0 3 unless (my $meta = $args{'meta'})
602 0 3 unless (my $arg = $args{'arg'})
611 0 3 unless (my $arg_spec = $args_prop->{$arg})
623 1 2 if ($idxcomp)
629 1 2 if ($idxcomp)
630 0 1 if (ref $idxcomp eq 'CODE') { }
1 0 elsif (ref $idxcomp eq 'ARRAY') { }
647 0 0 if ($args{'riap_client'} and $args{'riap_server_url'})
654 0 0 if ($res->[0] != 200)
667 0 2 unless ($sch)
675 0 2 if ($type ne "hash")
682 2 0 if ($cs->{'keys'})
685 0 2 if ($cs->{'indices'})
688 0 2 if ($cs->{'req_keys'})
691 2 0 if ($cs->{'allowed_keys'})
703 0 3 if $@
704 0 3 unless ($fres)
710 1 2 $static && $word eq '' ? :
831 0 24 unless my $meta = $args{'meta'}
832 0 24 unless my $words = $args{'words'}
833 0 24 unless defined $cword
858 0 24 unless $ggls_res->[0] == 200
890 13 8 if (my $sm = $specmeta->{$ospec}) { }
8 0 elsif ($type eq 'arg') { }
892 12 1 if ($sm->{'arg'}) { }
895 0 12 unless my $arg_spec = $$args_prop{$sm->{'arg'}}
896 1 11 if ($comp)
900 0 1 if $@
902 1 0 if ($compres)
907 1 10 if ($ospec =~ /\@$/) { }
4 6 elsif ($ospec =~ /\%$/) { }
914 1 3 if ($word =~ /(.*?)=(.*)/s) { }
946 1 0 if ($comp)
950 0 1 if $@
951 1 0 if ($res)
956 0 0 if ($codata->{'completion'})
961 0 0 if $@
962 0 0 if ($res)
967 0 0 if ($codata->{'schema'})
991 73 2 unless not $arg_spec->{'slurpy'} // $arg_spec->{'greedy'} and defined $arg_spec->{'pos'} and $arg_spec->{'pos'} == $pos - $fasa
994 1 1 if ($comp)
998 0 1 if $@
999 1 0 if ($res)
1017 0 3 unless $arg_spec->{'slurpy'} // $arg_spec->{'greedy'} and defined $arg_spec->{'pos'} and $arg_spec->{'pos'} <= $pos - $fasa
1022 2 1 if ($comp)
1026 0 2 if $@
1027 2 0 if ($res)
1039 2 1 if ($comp)
1043 0 2 if $@
1044 2 0 if ($res)