Condition Coverage

blib/lib/Getopt/Long.pm
Criterion Covered Total %
condition 101 299 33.7


and 3 conditions

line !l l&&!r l&&r condition
264 0 14 6 @optionlist and ref $optionlist[0]
14 0 6 @optionlist and ref $optionlist[0] and UNIVERSAL::isa($optionlist[0], "HASH")
273 0 20 0 @optionlist and $optionlist[0] =~ /^\W+$/
0 0 0 $optionlist[0] eq '<>' && @optionlist > 0 && ref $optionlist[1]
20 0 0 @optionlist and $optionlist[0] =~ /^\W+$/ and not $optionlist[0] eq '<>' && @optionlist > 0 && ref $optionlist[1]
298 0 0 0 @optionlist > 0 && ref $optionlist[0]
2 0 0 defined $userlinkage and not @optionlist > 0 && ref $optionlist[0]
2 0 0 defined $userlinkage and not @optionlist > 0 && ref $optionlist[0] and exists $userlinkage->{$opt}
0 0 0 defined $userlinkage and not @optionlist > 0 && ref $optionlist[0] and exists $userlinkage->{$opt} and ref $userlinkage->{$opt}
304 0 0 2 @optionlist > 0 and ref $optionlist[0]
0 0 2 @optionlist > 0 and ref $optionlist[0] and ref $optionlist[0] eq "CODE"
308 0 0 0 @optionlist and ref $optionlist[0]
322 0 0 0 @optionlist and ref $optionlist[0]
330 5 1 5 @optionlist > 0 and ref $optionlist[0]
331 6 0 0 exists $userlinkage->{$orig} and ref $userlinkage->{$orig}
346 8 7 15 @optionlist > 0 and ref $optionlist[0]
397 30 0 0 $opctl{$name}[0] eq "I" and $opctl{$name}[3] == 1 || $opctl{$name}[3] == 2
406 0 0 20 $argv and UNIVERSAL::isa($argv, "ARRAY")
441 0 18 52 $goon and @$argv > 0
448 0 51 1 defined $opt and $opt eq $argend
554 1 0 0 $debug and $eval_error ne ""
615 0 0 35 $argcnt >= $ctl->[5] and $ctl->[5] != -1
625 0 0 0 $ctl->[0] eq 'o' && $arg =~ /^0/
643 0 0 0 @$argv and &ValidValue($ctl, $argv->[0], 0, $argend, $prefix)
647 0 0 0 $ctl->[0] eq 'o' && $arg =~ /^0/
677 3 0 0 $debug and $eval_error ne ""
707 10 9 0 @ret and $order == $PERMUTE || $passthrough
818 15 2 0 $bundling and defined $4
821 17 0 0 defined $mi and not $mi
17 0 0 defined $mi and not $mi and not defined $ma
0 0 0 defined $mi and not $mi and not defined $ma and not defined $cm
834 0 17 0 defined $ma and not $ma
836 0 17 0 defined $ma and $ma < $mi
847 32 4 0 $bundling && length $_ == 1
887 39 0 0 $opt eq "-" and not defined $opctl->{''}
899 1 35 3 $starter =~ /^$longprefix$/ || $getopt_compat && ($bundling == 0 || $bundling == 2) and (my $oppos = index($opt, "=", 1)) > 0
913 37 2 0 $bundling || $bundling_values and $starter eq "-"
0 0 39 $autoabbrev and $opt ne ""
919 0 0 0 $bundling == 2 and length $tryopt > 1
0 0 0 $bundling == 2 and length $tryopt > 1 and defined $opctl->{$tryopt}
979 0 0 0 $auto_version and exists $hit{'version'}
0 0 0 $auto_help and exists $hit{'help'}
998 4 35 0 @hits == 1 and $hits[0] ne $opt
1000 0 0 0 $bundling && length $tryopt == 1
1017 0 0 1 $bundling == 1 and length $starter == 1
1076 0 0 0 $optargtype == 0 and not $mand
1122 17 0 0 $ctl->[3] == 2 and defined $arg
1168 2 0 0 $bundling and defined $rest
2 0 0 $bundling and defined $rest and $rest =~ /^($key_valid)($o_valid)(.*)$/is
1172 0 0 0 $type eq 'o' && $arg =~ /^0/
1173 0 0 0 defined $rest and $rest ne ""
1177 2 0 0 $type eq 'o' && $arg =~ /^0/
1212 0 0 0 $bundling and defined $rest
0 0 0 $bundling and defined $rest and $rest =~ /^($key_valid)($o_valid)(.*)$/s
1217 0 0 0 defined $rest and $rest ne ""
1311 19 0 7 $try eq 'default' || $try eq 'defaults' and $action
6 0 0 $try =~ /^prefix=(.+)$/ and $action
3 0 3 $try =~ /^prefix_pattern=(.+)$/ and $action
0 0 3 $try =~ /^long_prefix_pattern=(.+)$/ and $action
1466 0 0 0 @_ == 2 and $_[0] eq $tag

or 2 conditions

line l !l condition
721 0 0 $v[3] or 0
0 0 $v[4] || ''
0 0 $v[5] || ''
808 0 0 $dest ||= "\$"
825 0 17 $dest ||= "\$"
840 17 0 $ma || -1
1473 0 0 shift() || {}

or 3 conditions

line l !l&&r !l&&!r condition
208 2 1 0 $caller ||= (caller)[0]
223 5 15 0 $caller || (caller)[0]
351 13 0 2 $rl eq "SCALAR" or $rl eq "REF"
397 0 0 0 $opctl{$name}[3] == 1 || $opctl{$name}[3] == 2
422 0 0 0 defined $opctl{'help'} or defined $opctl{'?'}
482 29 0 1 ref $linkage{$opt} eq "SCALAR" or ref $linkage{$opt} eq "REF"
707 9 0 0 $order == $PERMUTE || $passthrough
787 15 0 21 $spec eq "" or $spec eq "+"
15 4 17 $spec eq "" or $spec eq "+" or $spec eq "!"
833 0 0 17 defined $ma or defined $cm
899 24 14 1 $starter =~ /^$longprefix$/ || $getopt_compat && ($bundling == 0 || $bundling == 2)
913 2 0 37 $bundling || $bundling_values
968 39 0 0 @hits <= 1 or grep(($_ eq $opt), @hits) == 1
1041 15 3 17 $type eq "" or $type eq "!"
18 0 17 $type eq "" or $type eq "!" or $type eq "+"
1042 15 0 3 $type eq "" or $type eq "+"
1067 0 0 0 defined $rest or @$argv > 0
1094 0 14 0 defined $rest || @$argv > 0
1099 0 0 0 $mand or $ctl->[3] == 2
1139 2 0 0 $type eq "i" or $type eq "I"
2 0 0 $type eq "i" or $type eq "I" or $type eq "o"
1148 0 0 1 defined $optarg or defined $rest
1153 0 0 1 $arg eq $argend or $arg =~ /^$prefix.+/
1180 0 0 0 defined $optarg or $mand
1223 0 0 0 defined $optarg or $mand
1260 0 0 0 $type eq "i" or $type eq "I"
0 0 0 $type eq "i" or $type eq "I" or $type eq "o"
1267 0 0 0 $arg eq $argend or $arg =~ /^$prefix.+/
1311 7 0 19 $try eq 'default' || $try eq 'defaults'
0 0 19 $try eq "posix_default" or $try eq "posix_defaults"
0 0 19 $try eq "auto_abbrev" or $try eq "autoabbrev"
0 6 13 $try eq "ignorecase" or $try eq "ignore_case"
0 2 11 $try eq "ignorecase_always" or $try eq "ignore_case_always"
2 0 6 $try eq "pass_through" or $try eq "passthrough"
1426 0 0 0 $pa->{'-output'} || ($pa->{'-exitval'} eq 'NOEXIT' || $pa->{'-exitval'} < 2 ? \*STDOUT : \*STDERR)