Branch Coverage

blib/lib/Getopt/Kingpin.pm
Criterion Covered Total %
branch 104 104 100.0


line true false branch
66 1 219 if (@args == 2) { }
101 33 20 if ($self->commands->count == 0)
119 127 1 if (scalar @argv == 0)
124 64 63 if (defined $exit_code)
134 24 128 if (defined $self->parent)
145 3 187 if ($arg eq '--') { }
88 99 elsif ($arg_only == 0 and $arg =~ /^--(no-)?(\S+?)(=(\S+))?$/) { }
16 83 elsif ($arg_only == 0 and $arg =~ /^-(\S+)$/) { }
153 4 84 if exists $required_but_not_found->{$name}
156 1 87 unless (defined $v)
162 47 40 if ($v->type eq 'Bool') { }
12 28 elsif (defined $equal) { }
163 2 45 defined $no ? :
171 3 83 if (defined $exit)
180 16 30 if (defined $f->short_name and $f->short_name eq $s)
184 2 16 unless (defined $name)
188 2 14 if exists $required_but_not_found->{$name}
192 9 7 if ($v->type eq 'Bool') { }
195 3 4 if (length $remain > 0) { }
204 1 15 if (defined $exit)
210 67 16 if ($arg_index == 0)
212 31 36 if (defined $cmd)
213 7 24 if ($cmd->name eq 'help') { }
219 13 11 if ($self->flags->get('help'))
227 52 7 unless ($arg_index == 0 and $arg eq 'help')
228 51 1 if ($arg_index < $self->args->count) { }
230 5 46 if (defined $exit)
233 34 12 unless ($self->args->get_by_index($arg_index)->is_cumulative)
244 40 74 if ($self->flags->get('help'))
249 1 73 if ($self->flags->get('version'))
255 45 90 if (defined $f->value) { }
2 88 elsif (defined $f->_envar) { }
84 4 elsif (defined $f->_default) { }
2 2 elsif ($f->type =~ /List$/) { }
259 1 1 if (defined $exit)
263 2 82 if ($f->type =~ /List$/) { }
266 1 2 if (defined $exit)
272 1 81 if (defined $exit)
282 36 15 if (defined $arg->value) { }
3 12 elsif (defined $arg->_envar) { }
6 6 elsif (defined $arg->_default) { }
2 4 elsif ($arg->type =~ /List$/) { }
286 1 2 if (defined $exit)
290 2 4 if ($arg->type =~ /List$/) { }
293 1 2 if (defined $exit)
299 1 3 if (defined $exit)
314 2 46 if ($arg->_required and not $arg->_defined)
340 6 17 if ($self->commands->count > 1) { }
345 2 15 if ($cmd->args->count > 0)
365 1 22 if ($self->description ne '')
372 6 17 if ($self->commands->count > 1) { }
375 5 12 if ($self->args->count > 0)