Branch Coverage

blib/lib/Zoidberg/Utils/GetOpt.pm
Criterion Covered Total %
branch 85 130 65.3


line true false branch
17 1 86 if (ref $conf)
23 76 10 if $conf =~ s/(?
24 71 15 unless $conf and $args[0] =~ /^[+-]/
26 12 41 s/([\$\@\%])$// ? :
28 51 2 if (not $opt =~ s/\*$//) { }
33 0 2 if @al or not length $_
39 1 14 if $conf{'_glob'}
48 0 48 if exists $conf{$$_[1]}
50 44 4 unless exists $conf{'_alias'}{'-' . $$_[0]} or exists $conf{'_alias'}{$$_[0]}
56 6 28 unless $args[0] =~ /^(-|\+.)/
59 1 27 unless length $2
64 10 17 if (exists $conf{'_alias'}{$raw} or exists $conf{$raw}) { }
3 14 elsif (exists $conf{'_glob'} and $raw =~ /$conf{'_glob'}/) { }
3 17 elsif ($pre ne '--' and length $opt > 1) { }
74 6 24 if @chars
75 10 20 if exists $conf{'_alias'}{$opt}
77 27 3 unless (defined $type)
78 26 1 if (exists $conf{$opt}) { }
83 18 11 if (not $type) { }
0 11 elsif (ref $type) { }
84 0 18 if defined $arg
85 2 16 $pre eq '+' ? :
92 2 9 defined $arg ? :
93 0 11 unless defined $arg
94 4 7 if ($type eq '$') { }
7 0 elsif ($type eq '@') { }
96 1 6 if (ref $arg) { }
97 0 1 if ref $arg ne 'ARRAY'
99 0 1 if ($opts{$opt}) { }
109 3 26 if @chars
111 1 0 @opts ? :
1 14 if not $delim and grep /^-/, @args
114 14 0 if @opts
117 9 76 if (not $conf{'_args'}) { }
34 42 elsif ($conf{'_args'} eq '@') { }
21 21 elsif ($conf{'_args'} eq '%') { }
21 0 elsif ($conf{'_args'} eq '*') { }
119 0 35 if ref $_
120 0 34 if grep {ref $_ ne 'ARRAY' if ref $_;} @args
121 0 34 if (ref $args[0] and @args == 1) { }
122 0 35 ref $_ ? :
125 19 3 if ref $_
126 0 21 if grep {ref $_ ne 'HASH' if ref $_;} @args
127 19 2 if (ref $args[0] and @args == 1) { }
131 0 3 if (ref $_) { }
133 0 3 unless /(.*?)=(.*)/
137 0 2 if $error
143 2 26 if (ref $_) { }
12 14 elsif (/(.*?)=(.*)/) { }
145 1 1 if ($t eq 'ARRAY') { }
1 0 elsif ($t eq 'HASH') { }
173 0 0 if $cmd =~ s/(.*):://
176 0 0 unless $file =~ m[^/]
182 0 0 if ($p) { }
0 0 elsif (/^=item\s+$cmd/) { }
183 0 0 if (/^=over/) { }
0 0 elsif (/^=back/) { }
0 0 elsif (/^=(item(?!\s+$cmd)|back|cut)/) { }
186 0 0 unless $o
188 0 0 unless $usage and not $o and not /^=item\s+$cmd/
199 0 0 if ($usage) { }
205 0 0 $1 eq 'C' ? :
0 0 $1 eq 'B' ? :
222 2 8 if (not defined $$hash{$1}) { }
0 8 elsif (ref $$hash{$1} ne 'HASH') { }