Branch Coverage

blib/lib/Circle/Commandable.pm
Criterion Covered Total %
branch 33 94 35.1


line true false branch
40 64 212 $args ? :
42 64 212 if ($prev)
43 0 64 if $$prev{'eatall'}
44 0 64 if $$prev{'collect'}
45 0 64 if $$prev{'trail'}
57 0 276 if $arg{'eatall'} and $arg{'collect'}
59 0 276 if keys %spec
62 4 272 if ($name eq '...') { }
66 0 272 if $name =~ /\W/
83 0 135 if keys %spec
85 0 135 unless $name =~ s/=(.*)$//
88 0 135 unless $opt{'type'} =~ /^[\$\+]$/
119 0 7 unless (exists $commands{$cmd})
120 0 0 $command ? :
134 0 0 unless ($subcmd)
155 2 6 if ($cinv->peek_remaining =~ /^-/) { }
160 0 2 unless $optspec and exists $$optspec{$optname}
165 2 0 if ($$optspec{$optname}{'type'} eq '$') { }
167 0 2 unless defined $optvalue
177 0 6 if not @argspec or $argindex >= @argspec
181 2 4 if ($$a{'eatall'}) { }
0 4 elsif ($$a{'collect'}) { }
0 4 elsif ($$a{'trail'}) { }
188 0 0 unless ref $args[-1]
204 0 0 if ($$a{'collect'}) { }
0 0 elsif ($$a{'trail'}) { }
205 0 0 unless ref $args[-1]
212 0 0 unless $$a{'optional'}
218 2 3 if $optspec
223 0 5 if ($@) { }
243 0 0 unless (defined $cmd)
249 0 0 unless (exists $commands{$cmd})
250 0 0 $command ? :
261 0 0 if ($command)
265 0 0 if (keys %commands)
266 0 0 if $command
272 0 0 if ($sub->is_default) { }
291 0 0 if $$a{'eatall'}
292 0 0 if $$a{'collect'}
293 0 0 if $$a{'optional'}
299 0 0 if (my $opts = $command->opts)
306 0 0 defined $$opts{$opt}{'desc'} ? :
308 0 0 $opttype eq '$' ? :
314 0 0 if (my $detail = $command->detail)
339 0 2 if defined $$self{'widget_commandentry'}
351 1 1 if ($text =~ m[^/]) { }
1 0 elsif ($self->can('enter_text')) { }