Branch Coverage

blib/lib/Getopt/EX/Hashed.pm
Criterion Covered Total %
branch 81 92 88.0


line true false branch
83 27 0 unless (%$config)
85 0 27 unless (%$config) = %DefaultConfig
99 2 4 if (ref $class) { }
102 0 4 $class ne 'Getopt::EX::Hashed' ? :
107 3 3 if ($key eq "DEFAULT")
108 1 2 unless ref $value eq "ARRAY"
109 1 1 unless @$value % 2 == 0
127 20 157 if (@param % 2)
128 1 19 ref $param[0] eq 'CODE' ? :
131 7 170 ref $key eq 'ARRAY' ? :
137 23 180 if ($append) { }
138 1 22 unless defined $i
141 0 180 if defined $i
151 4 10 $class ne 'Getopt::EX::Hashed' ? :
158 3 125 if $name eq "<>"
159 39 86 if (my $is = $param{'is'})
162 0 39 if (defined &$sub)
165 1 1 if $is eq "rw" and $config->{'ACCESSOR_LVALUE'}
170 8 117 if (ref $_ eq 'ARRAY') { }
5 112 elsif (ref $_ eq 'HASH') { }
4 108 elsif (ref $_ eq 'CODE') { }
176 14 0 if $config->{'LOCK_KEYS'}
186 88 40 unless $_->[1]{'is'}
188 39 1 if exists $hash->{$name}
199 7 1 if (@_ == 0) { }
1 0 elsif (@_ == 1 and ref $_[0] eq 'ARRAY') { }
228 1 27 if @_ > 1
232 1 2 if (@_ > 1)
236 1 6 if (@_ > 1)
239 0 39 unless {"ro", sub { die "$name is readonly\n" if @_ > 1; $_[0]{$name}; } , "rw", sub { if (@_ > 1) { $_[0]{$name} = $_[1]; return $_[0]; } ; $_[0]{$name}; } , "lv", sub : lvalue { if (@_ > 1) { $_[0]{$name} = $_[1]; return $_[0]; } ; $_[0]{$name}; } }->{$is}
253 3 120 if $name eq "<>"
255 4 109 if (my $alias = $m->{'alias'})
269 23 90 if (@spec == 0) { }
90 0 elsif (@spec == 1) { }
275 16 0 if /_/u and $obj->_conf->{'REPLACE_UNDERSCORE'}
276 6 10 if /_/u and $obj->_conf->{'REMOVE_UNDERSCORE'}
278 6 107 if @names and not $spec =~ /^($spec_re|$)/u
287 26 90 if (my $is_valid = _validator($m)) { }
14 76 elsif ($action) { }
291 9 23 unless &$is_valid
299 0 76 if (ref $obj->{$name} eq 'CODE') { }
339 90 26 unless my(@test) = _tester($m)
343 9 29 unless &$test
353 6 7 ref $dest eq 'HASH' ? :
7 13 ref $dest eq 'ARRAY' ? :
359 7 2 if (@_ <= 2) { }