Branch Coverage

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


line true false branch
36 22 0 if @_
45 22 0 if (my $base = delete $opt{'BASECLASS'})
49 2 20 if (my $file = delete $opt{'FILE'}) { }
20 0 elsif (my $module = delete $opt{'MODULE'}) { }
50 0 2 unless open my $fh, "<:encoding(utf8)", $file
58 2 18 if (ref $obj->{'Base'} eq 'ARRAY') { }
66 22 1 $base ? :
69 13 10 if ($@)
70 3 10 if @base and $@ =~ /Can't locate \Q$path\E/u
76 10 0 unless (eof data)
80 10 0 if $pos >= 0
86 0 12 if (my $builtin = delete $opt{'BUILTIN'})
90 0 12 if %opt
100 0 12 if (s/^__(?:CODE|PERL5?)__\s*\n(.*)//msu)
105 0 0 if $@
119 12 55 if (@_) { }
125 0 0 $mod =~ m[ .* [:/] (.+) ]ux ? :
132 18 0 if (@_) { }
152 38 2 if @_ == 1
153 0 2 if @_ % 2
177 0 101 if (ref $_[0] eq 'ARRAY') { }
185 0 101 if (my(@opt) = $obj->getlocal($args[$i]))
200 0 118 if $name eq "default" and not $opt{'DEFAULT'} || $opt{'ALL'}
204 28 882 if $_->[0] eq $name
206 19 99 $e ? :
210 99 19 unless (@e)
213 0 0 if (exists $hash->{$mod}{$name})
228 0 101 $e ? :
240 1 18 if ($obj->mode("function"))
242 1 0 if (/^&(.+)/u) { }
244 1 0 if ($func) { }
255 4 15 if ($obj->mode("wildcard"))
258 3 1 if (@glob) { }
284 0 0 if (@_) { }
288 0 0 $e ? :
307 0 111 if (defined $+{'here'}) { }
325 0 111 if (@arg < $min_args)
334 32 79 if ($arg[0] eq "builtin")
337 0 32 length $1 == 1 ? :
340 0 111 if ($arg[2] and $arg[2] =~ s[ (?:^|\s+) // \s+ (?.*) ][]ux)
347 8 103 if ($arg[0] eq 'define') { }
69 34 elsif ($arg[0] eq 'option') { }
0 34 elsif ($arg[0] eq 'expand') { }
0 34 elsif ($arg[0] eq 'defopt') { }
32 2 elsif ($arg[0] eq 'builtin') { }
0 2 elsif ($arg[0] eq 'autoload') { }
2 0 elsif ($arg[0] eq 'mode') { }
0 0 elsif ($arg[0] eq 'help') { }
362 32 0 if ($arg[2] =~ /^\\?(?[\$\@\%\&])(?[\w:]+)/u)
380 2 0 if (/^(no-?)?(.*)/iu)
381 0 2 $1 ? :
399 32 4 @_ ? :
414 0 0 if not grep({$_ eq $module;} @$list)
420 0 11 @_ ? :
427 5 17 if (defined &$func)
442 0 0 $call->can('call') ? :