Branch Coverage

blib/lib/Circle/Commandable.pm
Criterion Covered Total %
branch 34 96 35.4


line true false branch
42 64 216 $args ? :
44 64 216 if ($prev)
45 0 64 if $prev->{'eatall'}
46 0 64 if $prev->{'collect'}
47 0 64 if $prev->{'trail'}
59 0 68 if $arg{'eatall'} and $arg{'collect'}
61 0 280 if keys %spec
64 4 276 if ($name eq '...') { }
68 0 276 if $name =~ /\W/
85 0 138 if keys %spec
87 0 138 unless $name =~ s/=(.*)$//
90 0 138 unless $opt{'type'} =~ /^[\$\+]$/
121 0 7 unless (exists $commands{$cmd})
122 0 0 $command ? :
136 0 0 unless ($subcmd)
158 0 8 if ($cinv->peek_token eq '--')
164 2 6 if (not $no_more_opts and $cinv->peek_remaining =~ /^-/) { }
169 0 2 unless $optspec and exists $optspec->{$optname}
174 2 0 if ($optspec->{$optname}{'type'} eq '$') { }
176 0 2 unless defined $optvalue
186 0 6 if not @argspec or $argindex >= @argspec
190 2 4 if ($a->{'eatall'}) { }
0 4 elsif ($a->{'collect'}) { }
0 4 elsif ($a->{'trail'}) { }
197 0 0 unless ref $args[-1]
213 0 0 if ($a->{'collect'}) { }
0 0 elsif ($a->{'trail'}) { }
214 0 0 unless ref $args[-1]
222 0 0 unless $a->{'optional'}
227 2 3 if $optspec
232 0 5 if ($@) { }
252 0 0 unless (defined $cmd)
258 0 0 unless (exists $commands{$cmd})
259 0 0 $command ? :
270 0 0 if ($command)
274 0 0 if (keys %commands)
275 0 0 if $command
281 0 0 if ($sub->is_default) { }
300 0 0 if $a->{'eatall'}
301 0 0 if $a->{'collect'}
302 0 0 if $a->{'optional'}
308 0 0 if (my $opts = $command->opts)
315 0 0 defined $opts->{$opt}{'desc'} ? :
317 0 0 $opttype eq '$' ? :
323 0 0 if (my $detail = $command->detail)
348 0 2 if defined $self->{'widget_commandentry'}
360 1 1 if ($text =~ m[^/]) { }
1 0 elsif ($self->can('enter_text')) { }