Branch Coverage

blib/lib/Getopt/EX/Hashed.pm
Criterion Covered Total %
branch 90 102 88.2


line true false branch
110 31 0 unless (%$config)
112 0 31 unless %$config = %DefaultConfig
133 2 6 if (ref $class) { }
136 0 6 $class ne __PACKAGE__ ? :
141 3 5 if ($key eq "DEFAULT")
142 1 2 unless ref $value eq "ARRAY"
143 1 1 unless @$value % 2 == 0
168 22 170 if (@param % 2)
169 1 21 ref $param[0] eq 'CODE' ? :
173 0 192 if (defined $param{'spec'} and $param{'spec'} =~ s/\s*#\s*(.*)//u)
176 7 185 ref $key eq 'ARRAY' ? :
182 23 195 if ($append) { }
183 1 22 unless defined $i
186 0 195 if defined $i
199 7 14 $class ne __PACKAGE__ ? :
206 3 144 if $name eq "<>"
207 44 100 if (my $is = $param{'is'})
210 0 44 if (defined &$sub)
213 4 1 if $is eq "rw" and $config->{'ACCESSOR_LVALUE'}
218 12 132 if (ref $_ eq 'ARRAY') { }
9 123 elsif (ref $_ eq 'HASH') { }
4 119 elsif (ref $_ eq 'CODE') { }
224 21 0 if $config->{'LOCK_KEYS'}
234 1 21 unless delete $_masters{builtin::refaddr($obj)}
235 1 20 unless $obj->_conf->{'REMOVE_ACCESSOR'}
240 102 44 unless $_->[1]{'is'}
242 43 1 if exists $hash->{$name}
259 7 5 if (@_ == 0) { }
5 0 elsif (@_ == 1 and ref $_[0] eq 'ARRAY') { }
300 1 27 if @_ > 1
304 1 2 if (@_ > 1)
308 1 9 if (@_ > 1)
311 0 44 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}
331 3 136 if $name eq "<>"
333 4 125 if (my $alias = $m->{'alias'})
351 23 106 if (@spec == 0) { }
106 0 elsif (@spec == 1) { }
357 24 0 if /_/u and $obj->_conf->{'REPLACE_UNDERSCORE'}
358 6 18 if /_/u and $obj->_conf->{'REMOVE_UNDERSCORE'}
360 6 123 if @names and not $spec =~ /^($spec_re|$)/u
372 26 106 if (my $is_valid = _validator($m)) { }
14 92 elsif ($action) { }
376 9 23 unless &$is_valid
384 0 92 if (ref $obj->{$name} eq 'CODE') { }
16 76 elsif (ref $obj->{$name}) { }
435 106 26 unless my(@test) = _tester($m)
439 9 27 unless &$test
452 6 7 ref $dest eq 'HASH' ? :
7 13 if (ref $dest eq 'ARRAY') { }
6 7 elsif (ref $dest eq 'HASH') { }
461 7 2 if (@_ <= 2) { }