Branch Coverage

blib/lib/Commandable/Command.pm
Criterion Covered Total %
branch 55 62 88.7


line true false branch
106 22 8 if (my(%optspec) = $self->options)
111 0 31 if $token eq "--"
118 12 19 if ($token =~ s/^--([^=]+)(=|$)//u) { }
11 8 elsif ($token =~ s/^-(.)//u) { }
120 1 11 if (not $optspec{$opt} and $opt =~ /no-(.+)/u) { }
121 0 1 unless $spec = $optspec{$1} and $spec->negatable
126 0 11 unless $spec = $optspec{$opt}
131 0 11 unless $spec = $optspec{$1}
132 2 9 if ($spec->mode_expects_value) { }
2 8 elsif ($self->config->{'bundling'} and length $token and length $1 == 1) { }
142 1 7 if ($self->config->{'require_order'}) { }
152 10 13 if ($spec->mode_expects_value) { }
153 5 5 $value_in_token ? :
157 1 12 if $value_in_token or length $token
160 2 20 if (defined(my $typespec = $spec->typespec))
161 2 0 if ($typespec eq "i")
162 1 1 unless $value =~ /^-?\d+$/u
169 5 16 if ($spec->mode eq 'multi_value') { }
8 8 elsif ($spec->mode eq 'inc') { }
179 2 19 if defined $token_again
186 2 111 if defined $spec->default and not exists $opts->{$name}
192 10 6 if (defined $val) { }
1 5 elsif (not $argspec->optional) { }
193 4 6 if ($argspec->slurpy)
338 0 21 if $args{'name'} =~ /:$/u
339 1 20 if $args{'name'} =~ s/([=:])(.+?)$/$1/u
340 1 20 if (defined(my $typespec = $args{'typespec'}))
341 0 1 unless $typespec eq "i"
344 4 17 if $args{'name'} =~ s/[=:]$//u
345 5 16 if $args{'multi'}
348 2 19 if $args{'mode'} eq "bool"