Branch Coverage

blib/lib/Getopt/Long/Subcommand.pm
Criterion Covered Total %
branch 32 68 47.0


line true false branch
34 0 62 if ($is_completion) { }
41 62 0 ref $v eq 'HASH' ? :
42 62 0 if (ref $handler eq 'CODE')
63 34 6 if ($pass_through) { }
65 34 0 unless grep {$_ eq 'pass_through';} @configure
73 34 6 if $pass_through
110 0 0 $stash->{'path'} ? :
0 97 unless grep {$_ eq $k;} @known_cmdspec_keys
121 1 39 unless (_gl_getoptions($ospec, $cmdspec->{'configure'}, $pass_through, $res))
128 0 39 if ($is_completion)
135 34 5 if ($has_subcommands)
137 0 34 if ($is_completion)
149 0 34 if (defined $res->{'subcommand'}[$stash->{'level'}]) { }
29 5 elsif (@ARGV) { }
0 5 elsif (defined $cmdspec->{'default_subcommand'}) { }
165 0 29 if ($is_completion)
170 7 22 unless ($sc_spec)
172 3 4 $stash->{'path'} ? :
7 0 unless $is_completion
177 22 0 if $push
178 9 13 $stash->{'path'} ? :
197 0 18 if ($ENV{'COMP_SHELL'}) { }
0 18 elsif ($ENV{'COMMAND_LINE'}) { }
205 0 18 if ($ENV{'COMP_LINE'} or $ENV{'COMMAND_LINE'})
206 0 0 if ($ENV{'COMP_LINE'}) { }
0 0 elsif ($ENV{'COMMAND_LINE'}) { }
229 0 18 if ($is_completion)
238 0 0 if (not $cmdspec{'configure'}) { }
0 0 elsif (grep {$_ eq 'bundling';} @{$cmdspec{'configure'};}) { }
0 0 elsif (grep {$_ eq 'no_bundling';} @{$cmdspec{'configure'};}) { }
256 0 0 if ($type eq 'arg' and $args{'argpos'} < @{$res->{'comp_subcommand_names'} // [];})
268 0 0 if $cmdspec{'completion'}
272 0 0 if ($shell eq 'bash') { }
0 0 elsif ($shell eq 'tcsh') { }