Condition Coverage

blib/lib/Getopt/Compact/WithCmd.pm
Criterion Covered Total %
condition 91 119 76.4


and 3 conditions

line !l l&&!r l&&r condition
32 162 0 37 exists $args{'usage'} && !$args{'usage'}
110 0 51 0 $$self{'usage'} and $$opt{'help'} || $self->status == 0
123 22 8 7 defined $self->command and $self->command eq 'help'
160 23 0 14 $self->command and $self->command ne 'help'
196 0 32 5 defined $other_usage and length $other_usage > 0
546 6 0 8 defined $ARGV[0] and exists $$command_struct{$ARGV[0]}
586 40 176 10 exists $_[0]{'opt'}{'help'} && $_[0]{'opt'}{'help'}
773 49 1 220 $$self{'usage'} and not $self->_has_option('help')
821 0 0 2 defined $name and $src_type
0 0 2 defined $name and $src_type and ref $cb eq 'CODE'

or 2 conditions

line l !l condition
32 4 195 $args{'args'} || ''
79 120 $args{'command_struct'} || {}
56 138 61 $args{'global_struct'} || []
57 195 4 $self->_parse_struct || (return $self)
149 133 163 $$self{$_} || ''
181 12 50 $self->_opt_spec2name($arg_spec) || $arg_spec || ''
231 30 0 $shell ||= 'bash'
282 16 14 $$s{'args'} || ''
437 6 56 $self->_opt_spec2name($arg_spec) || $arg_spec || ''
467 16 19 $$command{'args'} || ''
518 95 0 $command_struct ||= {}
553 51 5 $$self{'commands'} ||= []
556 56 0 $self->_parse_struct || (return $self)
634 125 289 $type || ''
636 58 356 $opts ||= {}
701 1 1 $$self{'opt'}{$dest} ||= []
705 1 1 $$self{'opt'}{$dest} ||= {}
782 41 0 $$struct{$option} || {}
835 66 29 $$command_struct{$key}{'desc'} || ''

or 3 conditions

line l !l&&r !l&&!r condition
32 4 0 195 $args{'cmd'} || do { require File::Basename; File::Basename::basename($0) }
4 0 195 $args{'version'} || $main::VERSION
110 2 3 46 $$opt{'help'} || $self->status == 0
123 7 2 28 defined $self->command and $self->command eq 'help' or @targets
201 23 3 11 not $self->command or $$self{'has_sub_command'}
251 2 27 0 $$self{'name'} || substr($0, rindex($0, '/') + 1)
541 7 63 0 $$self{'command'} ||= $command
611 10 84 0 $struct ||= $$self{'_struct'}
646 6 0 14 ref $ref eq 'SCALAR' or ref $ref eq 'REF'
657 0 2 5 ref $ref eq 'SCALAR' or ref $ref eq 'REF'
671 0 2 4 ref $ref eq 'SCALAR' or ref $ref eq 'REF'
683 2 0 5 ref $ref eq 'SCALAR' or ref $ref eq 'REF'
733 1 11 0 $$TYPE_MAP{$spec} || $spec
0 3 9 not $spec or ($$TYPE_MAP{$spec} || $spec) eq '!'
802 287 2 138 not defined $spec or $spec eq ''
806 20 0 0 $$TYPE_MAP{$2} || Carp::croak("Can't find type constraint '$2'")
868 591 9 0 $la < 2 or $lb < 2