Condition Coverage

lib/Getopt/ArgParse/Parser.pm
Criterion Covered Total %
condition 116 141 82.2


and 2 conditions

line l !l condition
621 67 15 exists $$self{-'subparsers'} and scalar @argv

and 3 conditions

line !l l&&!r l&&r condition
146 0 0 18 $parent_class and $parent_class->isa('Getopt::ArgParse::Parser')
361 3 7 17 $type != 4 and $type != 2
10 13 4 $type != 4 and $type != 2 and $nargs ne '1'
20 1 3 $type != 4 and $type != 2 and $nargs ne '1' and $nargs ne '?'
402 196 3 0 defined $split and not $split
199 0 0 defined $split and not $split and $split =~ /^ +$/
406 196 2 1 defined $split and $type != 2
198 1 0 defined $split and $type != 2 and $type != 4
428 1 13 1 $type != 2 and scalar @$default > 1
438 194 1 2 $choices and ref $choices ne 'CODE'
195 2 0 $choices and ref $choices ne 'CODE' and ref $choices ne 'ARRAY'
447 194 2 1 $choices and $choices_i
451 194 1 1 $choices_i and ref $choices_i ne 'ARRAY'
621 0 0 15 exists $$self{-'subparsers'} and scalar @argv and defined $argv[0]
0 4 11 exists $$self{-'subparsers'} and scalar @argv and defined $argv[0] and substr($argv[0], 0, 1) ne '-'
639 4 51 1 $self->print_usage_if_help and $self->namespace->get_attr('help')
644 1 7 2 $self->print_usage_if_help and $self->_command eq 'help'
794 14 34 3 scalar @$values and scalar @$values != $number
834 76 59 63 not defined $self->namespace->get_attr($$spec{'dest'}) and scalar @$values < 1
135 55 8 not defined $self->namespace->get_attr($$spec{'dest'}) and scalar @$values < 1 and defined $$spec{'default'}
955 169 2 15 $$spec{'required'} and not $self->namespace->get_attr('help')
1183 20 14 6 $print_type == 2 and $$spec{'required'}
14 6 14 $print_type == 1 and not $$spec{'required'}
1222 20 0 0 $$spec{'choices'} and ref $$spec{'choices'} ne 'CODE'

or 2 conditions

line l !l condition
206 8 7 delete $$args{'title'} || 'subcommands'
207 2 13 delete $$args{'description'} || ''
262 4 28 delete $$args{'parents'} || []
267 23 9 delete $$args{'help'} || ''
268 1 31 delete $$args{'description'} || ''
269 5 27 delete $$args{'aliases'} || []
352 139 62 delete $$args{'type'} || 'Scalar'
382 33 166 delete $$args{'action'} || '_store'
437 3 194 delete $$args{'choices'} || undef
445 3 194 delete $$args{'choices_i'} || undef
460 17 178 delete $$args{'required'} || ''
469 111 84 delete $$args{'help'} || ''
507 15 178 $required || ''
1066 6 0 shift @desc || ''
1147 0 0 $$self{-'group_description'}{$group} || ''
1253 20 0 shift @help || ''
1296 0 0 $$spec{'type'} || 'undef'

or 3 conditions

line l !l&&r !l&&!r condition
370 15 8 166 $type == 2 or $type == 4
462 107 10 78 $type == 5 or $type == 3
474 0 195 0 delete $$args{'metavar'} || uc $name
476 107 10 78 $type == 5 or $action_name eq '_count'
483 89 106 0 delete $$args{'dest'} || $name
705 10 4 144 $$spec{'type'} == 2 or $$spec{'type'} == 3
14 4 140 $$spec{'type'} == 2 or $$spec{'type'} == 3 or $$spec{'type'} == 4
8 48 92 $$spec{'type'} == 2 or $$spec{'type'} == 3 or $$spec{'type'} == 4 or $$spec{'type'} == 1
982 1 0 0 shift() || $self->namespace->get_attr('help_command') || $self->namespace->get_attr('current_command')
1183 6 0 34 $print_type == 2 and $$spec{'required'} or $print_type == 1 and not $$spec{'required'}
1237 10 10 0 $$spec{'help'} || 'This is option ' . $$spec{'dest'}