Branch Coverage

blib/lib/Declare/CLI.pm
Criterion Covered Total %
branch 96 120 80.0


line true false branch
64 2 56 if $type || !$ref and eval { do { $first->can('CLI_META') } }
67 0 56 unless $meta
83 10 0 unless $params{'args'}
85 10 0 unless $params{'opts'}
95 0 2 unless $self->$meth->{$name}
98 2 0 if $desc
110 3 10 @params > 1 ? :
112 0 13 if $self->args->{$name}
116 16 0 if $prop =~ $self->valid_arg_params
123 0 13 unless $config{'handler'}
126 2 11 if (exists $config{'alias'})
127 0 2 ref $config{'alias'} ? :
135 0 2 if $self->args->{$alias}
153 0 41 if $self->opts->{$name}
157 56 0 if $prop =~ $self->valid_opt_params
164 0 41 if $config{'bool'} and $config{'check'}
167 0 41 if $config{'bool'} and $config{'transform'}
170 2 39 if $config{'list'} and $config{'bool'}
173 4 35 if (exists $config{'default'})
174 0 4 if ref $config{'default'} and ref $config{'default'} ne 'CODE'
179 18 21 if (exists $config{'check'})
181 4 14 if $ref and not $ref =~ /^(CODE|Regexp)$/ or not $ref || $config{'check'} =~ /^(file|dir|number)$/
186 4 31 if (exists $config{'alias'})
187 2 2 ref $config{'alias'} ? :
195 0 6 if $self->opts->{$alias}
211 6 38 if ($$spec{'bool'})
212 2 4 if defined $value
213 2 2 $$spec{'default'} ? :
216 10 28 defined $value ? :
218 14 24 $$spec{'list'} ? :
229 22 24 unless $check
234 4 20 if ($ref eq 'Regexp') { }
4 16 elsif ($ref eq 'CODE') { }
4 12 elsif ($check eq 'file') { }
4 8 elsif ($check eq 'dir') { }
8 0 elsif ($check eq 'number') { }
250 14 10 unless @bad
265 2 6 $$spec{'list'} ? :
2 8 $$spec{'bool'} ? :
267 0 10 $seen{$name}++ ? :
280 0 6 $seen{$name}++ ? :
315 0 5 unless $args and @$args
323 0 4 unless $handler
345 6 0 if $consumer->can('set_opts')
346 0 6 if $consumer->can('set_args')
348 3 2 unless @$args and $self->_item_name('argument', $self->args, $$args[0])
366 4 60 if ($item eq '--')
371 48 12 if ($item =~ /^-+([^-=]+)(?:=(.+))?$/ and not $no_opts)
375 2 44 unless $pre or $opt
379 12 44 unless ($opt)
390 14 30 if ($self->opts->{$opt}{'list'}) { }
400 4 4 if exists $$opts{$opt}
402 0 4 ref $val ? :
416 12 34 if (ref $values and ref $values eq 'ARRAY') { }
427 4 42 if $transform
432 8 28 $list ? :
434 4 32 if $trigger
444 43 13 if $$hash{$key}
452 4 9 if @matches > 1
455 2 7 unless @matches