Branch Coverage

blib/lib/Perinci/Sub/GetArgs/Argv.pm
Criterion Covered Total %
branch 192 234 82.0


line true false branch
50 1 0 if (eval {
58 4 0 if $cleanser
67 1 0 if (eval {
80 5 0 if ($yaml_xs_available) { }
85 0 0 unless $str =~ /\A--- /
86 0 0 unless $str =~ /\n\z/
104 0 192 unless my $cset = $nsch->[1]
105 190 2 unless my $rules = $cset->{'x.perl.coerce_rules'} // $cset->{'x.coerce_rules'}
108 0 2 unless $rule =~ /\A([^_]+)_/
109 2 0 if is_simple($1)
116 192 369 unless is_simple($nsch)
134 1 461 unless (is_type($nsch))
143 274 188 if $is_simple
145 104 84 if ($type eq 'array')
147 40 64 unless $elnsch
152 1 63 unless (is_type($elnsch))
164 83 1 if ($type eq 'hash')
166 48 35 unless $elnsch
171 1 34 unless (is_type($elnsch))
198 54 180 if ($is_array_of_simple or $is_hash_of_simple)
200 2 52 if ($arg_spec and $arg_spec->{'x.name.is_plural'}) { }
201 1 1 if ($arg_spec->{'x.name.singular'}) { }
212 35 19 $is_array_of_simple ? :
213 19 35 $is_hash_of_simple ? :
216 180 54 if ($is_simple or not @opts)
231 22 212 if ($type eq 'bool') { }
3 209 elsif ($type eq 'buf') { }
232 4 18 if (length $opt == 1) { }
2 16 elsif ($cset->{'is'} or $cset->{'is_true'}) { }
1 15 elsif (defined $cset->{'is'} and not $cset->{'is'} or defined $cset->{'is_true'} and not $cset->{'is_true'}) { }
262 2 190 $type eq 'float' ? :
17 192 $type eq 'int' ? :
19 155 $ishos ? :
35 174 $isaos ? :
289 0 0 unless $_ eq 'hidden'
290 0 208 if grep {$_ eq 'hidden-cli' unless $_ eq 'hidden';} @{$arg_spec->{'tags'} // [];}
296 25 19 if ($type eq 'array' and $cset->{'of'})
300 3 205 if ($seen_opts->{$opt})
304 0 3 $i > 1 ? :
305 3 0 unless $seen_opts->{$opt2}
331 5 77 if (ref $rargs eq 'ARRAY') { }
339 54 28 if ($is_simple) { }
16 12 elsif ($is_array_of_simple) { }
7 5 elsif ($is_hash_of_simple) { }
354 3 2 if ($success)
360 1 1 if ($success)
368 5 76 if ($val_set and $arg_spec->{'cmdline_on_getopt'})
380 31 210 if ($extra->{'is_neg'}) { }
15 195 elsif (defined $extra->{'is_neg'}) { }
3 192 elsif ($extra->{'is_base64'}) { }
399 8 233 if ($parent_args->{'per_arg_json'} and not $is_simple)
401 0 8 if ($seen_opts->{$jopt}) { }
409 1 0 if ($success) { }
419 8 233 if ($parent_args->{'per_arg_yaml'} and not $is_simple)
421 0 8 if ($seen_opts->{$yopt}) { }
429 1 0 if ($success) { }
441 31 210 if ($arg_spec->{'cmdline_aliases'} and not $aliases_processed++)
445 5 30 $alspec->{'schema'} // $alspec->{'is_flag'} ? :
448 0 35 if ($seen_opts->{$alopt})
455 9 26 if ($alcode and $alsch->[0] eq 'bool') { }
463 12 23 if ($alcode) { }
464 3 9 if ($alcode eq 'CODE')
465 1 2 if ($parent_args->{'ignore_converted_code'}) { }
483 0 3 if (ref $rargs eq 'ARRAY') { }
497 10 23 $alcode ? :
507 10 23 $alcode ? :
514 2 237 if ($arg_spec->{'meta'})
522 0 2 if $res
526 3 236 if ($arg_spec->{'element_meta'})
534 0 3 if $res
673 0 76 unless my $meta = $fargs{'meta'}
674 1 75 unless ($fargs{'meta_is_normalized'})
694 0 9 unless my $res = parse_getopt_long_opt_spec($ospec)
699 0 12 if $seen_opts{$_}
701 1 11 if ($res->{'is_neg'})
719 2 74 if $res
721 243 59 length $_ > 1 ? :
722 11 3 length $_ > 1 ? :
723 232 56 length $_ > 1 ? :
730 44 14 unless $seen_common_opts{$_} eq $ospec
731 11 3 length $_ > 1 ? :
739 232 56 length $_ > 1 ? :
944 0 75 unless my $meta = $fargs{'meta'}
945 75 0 unless ($fargs{'meta_is_normalized'})
970 2 73 if $genres->[0] != 200
977 1 72 unless $strict
978 72 1 $strict ? :
983 9 64 unless ($res)
984 9 0 if $strict
993 13 51 if (@$argv)
999 2 11 if ($res->[0] != 200 and $strict) { }
0 11 elsif ($strict and $res->[0] != 200) { }
10 1 elsif ($res->[0] == 200) { }
1008 2 9 if (exists $rargs->{$name})
1010 2 0 if $strict
1015 1 2 if ($arg_spec->{'slurpy'} // $arg_spec->{'greedy'} and ref $val eq 'ARRAY' and not $is_array_of_simple and not $is_hash_of_simple)
1022 1 0 if ($per_arg_json)
1024 0 1 if ($success) { }
1031 1 0 if ($per_arg_yaml)
1033 1 0 if ($success) { }
1044 1 5 unless ($arg_spec->{'slurpy'} // $arg_spec->{'greedy'} or $is_simple)
1048 1 0 if ($per_arg_json)
1050 0 1 if ($success) { }
1057 1 0 if ($per_arg_yaml)
1059 1 0 if ($success) { }
1070 2 7 if ($arg_spec->{'cmdline_on_getopt'})
1071 2 0 if ($arg_spec->{'slurpy'} // $arg_spec->{'greedy'}) { }
1092 70 79 unless (exists $rargs->{$arg})
1093 65 5 unless $arg_spec->{'req'}
1095 2 3 if ($on_missing)
1096 1 1 if &$on_missing('arg', $arg, 'args', $rargs, 'spec', $arg_spec)
1098 1 3 if exists $rargs->{$arg}
1105 1 59 unless $strict
1109 68 79 unless exists $rargs->{$arg}
1110 77 2 unless $arg_spec->{'deps'}
1112 0 2 unless $dep_arg
1115 1 1 unless exists $rargs->{$dep_arg}