Branch Coverage

blib/lib/Commandable/Command.pm
Criterion Covered Total %
branch 35 40 87.5


line true false branch
80 15 8 if (my(%optspec) = $self->options)
85 0 17 if $token eq "--"
91 9 8 if ($token =~ s/^--([^=]+)(=|$)//u) { }
4 4 elsif ($token =~ s/^-(.)//u) { }
93 1 8 if (not $optspec{$opt} and $opt =~ /no-(.+)/u) { }
94 0 1 unless $spec = $optspec{$1} and $spec->negatable
99 0 8 unless $spec = $optspec{$opt}
104 0 4 unless $spec = $optspec{$1}
114 5 8 if ($spec->mode =~ /value$/u)
115 3 2 $value_in_token ? :
119 2 11 if ($spec->mode eq 'multi_value') { }
5 6 elsif ($spec->mode eq 'inc') { }
134 2 56 if defined $spec->default and not exists $opts->{$name}
140 7 6 if (defined $val) { }
1 5 elsif (not $argspec->optional) { }
141 1 6 if ($argspec->slurpy)
185 0 12 if $args{'name'} =~ /:$/u
186 3 9 if $args{'name'} =~ s/[=:]$//u
187 2 10 if $args{'multi'}
190 2 10 if $args{'mode'} eq "bool"