Branch Coverage

blib/lib/Data/NestedKey.pm
Criterion Covered Total %
branch 61 94 64.8


line true false branch
31 4 3 ref $args[0] ? :
35 7 0 _is_hash($init_data) ? :
38 0 7 unless (_is_hash($init_data))
43 4 3 unless @kv_list
47 0 3 if @kv_list and @kv_list % 2 != 0
82 17 56 if ($part =~ /\A (.+?) \[ (-?\d+) \] \z/msx) { }
113 0 0 if (_is_hash($current)) { }
114 0 0 if $create and not exists $current->{$key}
116 0 0 unless exists $current->{$key}
125 0 0 if (defined $idx)
126 0 0 unless _is_array($current)
130 0 0 unless defined $current
142 0 18 if @kv_list % 2 != 0
147 7 13 $key_path =~ s/\A([+-])//msx ? :
150 1 19 if $key_path =~ /\[/
163 4 15 if ($action eq '+') { }
3 12 elsif ($action eq '-') { }
164 1 3 if (_is_array($current->{$final_key})) { }
1 2 elsif (_is_hash($current->{$final_key}) and _is_hash($value)) { }
0 2 elsif (_is_hash($current->{$final_key})) { }
2 0 elsif (exists $current->{$final_key}) { }
181 1 2 if (_is_array($current->{$final_key})) { }
1 1 elsif (_is_hash($current->{$final_key})) { }
193 0 12 if _is_hash($current->{$final_key}) and not _is_hash($value)
216 45 2 if (_is_hash($current) and exists $current->{$key}) { }
225 11 34 if (defined $idx)
226 11 0 if (_is_array($current)) { }
237 24 2 $ok ? :
240 12 13 wantarray ? :
248 4 0 if $FORMAT eq "JSON" and $JSON_PRETTY
249 0 6 if $FORMAT eq "JSON"
250 2 4 if $FORMAT eq "YAML"
251 2 2 if $FORMAT eq "Dumper"
252 2 0 if $FORMAT eq "Storable"
271 0 4 unless _is_hash($current) and exists $current->{$key}
276 0 4 if (defined $idx)
277 0 0 if (_is_array($current)) { }
280 0 0 unless (defined $current)
294 0 4 if $abort
299 2 2 if (defined $final_idx) { }
301 2 0 if (_is_hash($current) and exists $current->{$final_key} and _is_array($current->{$final_key}))
308 2 0 if (_is_hash($current) and exists $current->{$final_key})
316 1 2 if not _is_hash($parent->{$key}) or %{$parent->{$key};}
338 11 4 if (_is_hash($current) and exists $current->{$key}) { }
346 4 7 if (defined $idx)
347 3 1 if (_is_array($current) and defined $current->[$idx]) { }
360 0 8 wantarray ? :