Branch Coverage

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


line true false branch
67 1 263 if (@args == 2) { }
102 36 21 if ($self->commands->count == 0)
120 161 3 if (scalar @argv == 0)
125 73 90 if (defined $exit_code)
135 27 164 if (defined $self->parent)
145 2 71 if (@argv == 1 and ref $argv[0] and ref $argv[0] eq 'ARRAY')
151 3 218 if ($arg eq '--') { }
110 108 elsif ($arg_only == 0 and $arg =~ /^--(no-)?(\S+?)(=(\S+))?$/) { }
16 92 elsif ($arg_only == 0 and $arg =~ /^-(\S+)$/) { }
159 4 106 if exists $required_but_not_found->{$name}
162 1 109 unless (defined $v)
168 52 57 if ($v->type eq 'Bool') { }
13 44 elsif (defined $equal) { }
169 2 50 defined $no ? :
177 6 102 if (defined $exit)
186 16 30 if (defined $f->short_name and $f->short_name eq $s)
190 2 16 unless (defined $name)
194 2 14 if exists $required_but_not_found->{$name}
198 9 7 if ($v->type eq 'Bool') { }
201 3 4 if (length $remain > 0) { }
210 1 15 if (defined $exit)
216 76 16 if ($arg_index == 0)
218 34 42 if (defined $cmd)
219 7 27 if ($cmd->name eq 'help') { }
225 13 14 if ($self->flags->get('help'))
233 58 7 unless ($arg_index == 0 and $arg eq 'help')
234 57 1 if ($arg_index < $self->args->count) { }
237 5 52 if (defined $exit)
240 34 18 unless ($arg_obj->is_cumulative or $arg_obj->is_hash)
251 45 102 if ($self->flags->get('help'))
256 1 101 if ($self->flags->get('version'))
263 90 167 if (defined $item->value) { }
5 162 elsif (defined $item->_envar) { }
136 26 elsif (defined $item->_default) { }
8 18 elsif ($item->type =~ /List$/) { }
7 11 elsif ($item->type =~ /Hash$/) { }
267 2 3 if (defined $exit)
272 12 124 if (ref $default eq 'CODE' or &blessed($default) and overload::Method($default, '&{}'))
276 8 128 if ($item->type =~ /List$/) { }
8 120 elsif ($item->type =~ /Hash$/) { }
279 2 12 if (defined $exit)
286 1 15 if (defined $exit)
292 2 118 if (defined $exit)
306 4 184 if @r > 1
311 3 66 if @r > 1
320 2 64 if ($arg->_required and not $arg->_defined)
346 6 20 if ($self->commands->count > 1) { }
351 2 15 if ($cmd->args->count > 0)
371 1 25 if ($self->description ne '')
378 6 20 if ($self->commands->count > 1) { }
381 5 15 if ($self->args->count > 0)