Branch Coverage

blib/lib/Getopt/EX/Module.pm
Criterion Covered Total %
branch 67 112 59.8


line true false branch
35 22 0 if @_
44 22 0 if (my $base = delete $opt{'BASECLASS'})
48 1 21 if (my $file = delete $opt{'FILE'}) { }
21 0 elsif (my $module = delete $opt{'MODULE'}) { }
49 1 0 if (open my $fh, "<:encoding(utf8)", $file)
57 2 19 if (ref $obj->{'Base'} eq 'ARRAY') { }
65 23 1 $base ? :
67 12 12 if ($@)
69 3 9 if @base and $@ =~ /Can't locate \Q$path\E/u
75 12 0 unless (eof data)
79 12 0 if $pos >= 0
85 0 13 if (my $builtin = delete $opt{'BUILTIN'})
89 0 13 if %opt
99 0 13 if (s/^__(?:CODE|PERL)__\s*\n(.*)//msu)
104 0 0 if $@
118 13 38 @_ ? :
124 0 0 $mod =~ m[ .* [:/] (.+) ]ux ? :
131 19 0 if (@_) { }
151 36 5 if @_ == 1
152 0 5 if @_ % 2
176 0 94 if (ref $_[0] eq 'ARRAY') { }
184 0 94 if (my(@opt) = $obj->getlocal($args[$i]))
199 0 113 if $name eq "default" and not $opt{'DEFAULT'} || $opt{'ALL'}
203 27 852 if $_->[0] eq $name
205 18 95 $e ? :
209 95 18 unless (@e)
212 0 0 if (exists $hash->{$mod}{$name})
227 0 94 $e ? :
239 1 17 if ($obj->mode("function"))
241 1 0 if (/^&(.+)/u) { }
243 1 0 $func ? :
254 4 14 if ($obj->mode("wildcard"))
257 3 1 @glob ? :
283 0 0 if (@_) { }
287 0 0 $e ? :
306 0 106 if (defined $+{'here'}) { }
324 0 106 if (@arg < $min_args)
333 28 78 if ($arg[0] eq "builtin")
336 0 28 length $1 == 1 ? :
339 0 106 if ($arg[2] and $arg[2] =~ s[ (?:^|\s+) // \s+ (?.*) ][]ux)
346 7 99 if ($arg[0] eq 'define') { }
66 33 elsif ($arg[0] eq 'option') { }
0 33 elsif ($arg[0] eq 'expand') { }
0 33 elsif ($arg[0] eq 'defopt') { }
28 5 elsif ($arg[0] eq 'builtin') { }
0 5 elsif ($arg[0] eq 'autoload') { }
5 0 elsif ($arg[0] eq 'mode') { }
0 0 elsif ($arg[0] eq 'help') { }
361 28 0 if ($arg[2] =~ /^\\?(?[\$\@\%\&])(?[\w:]+)/u)
379 5 0 if (/^(no-?)?(.*)/iu)
380 0 5 $1 ? :
398 28 4 @_ ? :
413 0 0 if not grep({$_ eq $module;} @$list)
419 0 9 @_ ? :
426 5 13 if (defined &$func)
441 0 0 $call->can('call') ? :