Branch Coverage

blib/lib/Hash/Layout.pm
Criterion Covered Total %
branch 94 142 66.2


line true false branch
45 0 9 unless looks_like_number $index
48 0 9 unless $self->levels->[$index]
91 11 1 if ($self->allow_deep_values)
93 0 76 if $Lvl->delimiter and $Lvl->delimiter eq $self->deep_delimiter
110 0 7 unless blessed $self
111 4 3 if (scalar @args == 1)
112 1 3 if (ref $args[0]) { }
0 3 elsif (not defined $args[0]) { }
113 1 0 if blessed($args[0]) and blessed($args[0]) eq 'Hash::Layout'
114 0 0 if ref $args[0] eq 'ARRAY'
121 6 0 scalar @args > 0 ? :
126 0 50 unless defined $key_str
127 0 50 if scalar @addl > 0
137 2 61 if $self->lookup_mode eq 'get'
139 0 61 unless defined $path[0]
145 28 33 if ($self->exists_path(@path))
147 8 8 unless ref $val and ref $val eq 'HASH' and $self->lookup_mode eq 'merge'
152 8 0 if ref $val and ref $val eq 'HASH'
159 30 45 unless $self->exists_path(@$dpath)
161 6 39 unless $self->lookup_mode eq 'merge'
162 23 16 if (ref $val and ref $val eq 'HASH') { }
164 20 3 $hash_val ? :
170 0 16 $hash_val ? :
183 0 0 ref $v && ref $v eq 'HASH' && scalar keys %$v > 0 ? :
188 0 3 unless defined $key_str
189 0 3 if scalar @addl > 0
198 0 82 unless defined $path[0]
209 0 0 unless defined $key_str
210 0 0 if scalar @addl > 0
219 0 142 unless defined $path[0]
227 0 4 unless defined $key_str
228 0 4 if scalar @addl > 0
237 0 6 unless defined $path[0]
240 2 4 unless $self->exists_path(@path)
289 372 142 $check_mask & $mask ? :
294 90 17 unless $seen_combo{join '/', @combo}++
308 0 371 unless my $Lvl = $self->levels->[$index]
312 0 394 unless defined $arg
316 18 376 unless (ref $arg)
322 0 394 unless ref $arg eq 'HASH'
325 0 412 unless defined $key and not ref $key
331 56 356 if ($force_composite or $self->_is_composite_key($key, $index)) { }
336 56 0 if (scalar @path > 0) { }
349 222 134 if ($key eq $self->default_key)
355 304 52 if ($is_hashval) { }
357 15 289 if ($last_level) { }
369 42 314 if ($index == 0 and $$bmref)
388 0 9 unless my $Lvl = $self->levels->[$index]
391 3 6 if ($last_level) { }
397 6 0 scalar @path > 0 ? :
407 0 360 unless ref $hash and ref $hash eq 'HASH'
408 0 360 unless scalar @path > 0
415 0 360 unless ref $hval and ref $hval eq 'HASH'
425 0 3 unless scalar @_ == 3
426 0 3 unless $key and $key ne ''
435 588 0 scalar @path > 0 ? :
454 2955 353 if ($Lvl) { }
455 5 2950 if $Lvl->registered_keys and $Lvl->registered_keys->{$key}
459 353 0 if ($self->allow_deep_values) { }
477 817 133 if ($Lvl) { }
479 210 607 if ($peeled) { }
482 192 18 if $leftover
486 0 18 $last_level ? :
494 146 461 $self->no_pad || $as_is ? :
498 132 1 if ($self->allow_deep_values) { }
511 0 12 unless ref $val and ref $val eq 'ARRAY'
517 0 79 if blessed $itm
519 0 79 unless ref $itm and ref $itm eq 'HASH'
523 0 79 if $$itm{'name'} and $seen{$$itm{'name'}}++
527 0 79 if scalar @$val == ++$i and $$itm{'delimiter'}
538 0 12 unless scalar @new > 0