Branch Coverage

blib/lib/Data/DRef.pm
Criterion Covered Total %
branch 31 122 25.4


line true false branch
108 0 3 if (UNIVERSAL::can($target, 'm_get_keys')) { }
3 0 elsif (UNIVERSAL::isa($target, 'HASH')) { }
0 0 elsif (UNIVERSAL::isa($target, 'ARRAY')) { }
124 0 0 if (UNIVERSAL::can($target, 'm_get_values')) { }
0 0 elsif (UNIVERSAL::isa($target, 'HASH')) { }
0 0 elsif (UNIVERSAL::isa($target, 'ARRAY')) { }
0 0 elsif (not ref $target) { }
140 0 29 unless defined $target
144 0 29 if (UNIVERSAL::can($target, 'm_get_value_for_key')) { }
26 3 elsif (UNIVERSAL::isa($target, 'HASH')) { }
3 0 elsif (UNIVERSAL::isa($target, 'ARRAY')) { }
147 26 0 if exists $$target{$key}
149 0 3 unless $key eq '0' or $key > 0
150 3 0 if $key >= 0 and $key < scalar @$target
160 0 5 unless defined $target
162 0 5 if (UNIVERSAL::can($target, 'm_set_value_for_key')) { }
5 0 elsif (UNIVERSAL::isa($target, 'HASH')) { }
0 0 elsif (UNIVERSAL::isa($target, 'ARRAY')) { }
179 0 1 if UNIVERSAL::can($target, 'm_get_or_create_value_for_key')
184 0 1 unless (defined $value)
195 0 0 unless defined $target
199 0 0 if (UNIVERSAL::can($target, 'm_get_reference_for_key')) { }
0 0 elsif (UNIVERSAL::isa($target, 'HASH')) { }
0 0 elsif (UNIVERSAL::isa($target, 'ARRAY')) { }
218 0 17 unless defined $target
219 0 17 unless scalar @_
223 0 28 if UNIVERSAL::can($target, 'm_get_value_for_keys')
230 17 11 unless scalar @_
233 0 11 unless ref $result
245 0 5 unless defined $target
246 0 5 unless scalar @_
249 0 6 if UNIVERSAL::can($target, 'm_set_value_for_keys')
255 5 1 unless scalar @_
261 0 1 unless ref $result
272 0 0 unless defined $target
273 0 0 unless scalar @_
276 0 0 if UNIVERSAL::can($target, 'm_get_or_create_value_for_keys')
283 0 0 unless scalar @_
286 0 0 unless ref $result
297 0 0 unless defined $target
298 0 0 unless scalar @_
301 0 0 if UNIVERSAL::can($target, 'm_get_reference_for_keys')
307 0 0 unless scalar @_
313 0 0 unless ref $result
380 22 0 wantarray ? :
385 0 0 if ($type eq $Data::DRef::DRefPrefix) { }
0 0 elsif ($type eq '!') { }
425 0 0 $_[0] =~ /^\Q$Data::DRef::DRefPrefix\E(.*)/o ? :
433 0 0 unless $target and scalar %kvp_criteria
438 0 0 defined $dref && length $dref ? :
0 0 unless $kvp_criteria{$dref} eq (defined $dref && length $dref ? get_value_for_dref($item, $dref) : $item)
442 0 0 unless wantarray
454 0 0 defined $dref && length $dref ? :
0 0 unless $kvp_criteria{$dref} eq (defined $dref && length $dref ? get_value_for_dref($item, $dref) : $item)
458 0 0 unless wantarray
504 0 0 unless defined $value
505 0 0 unless exists $$index{$value}
526 2 2 if not ref $value or $visited{$value}++
528 2 0 if (scalar @subkeys)
587 0 0 if $target->can($key)
594 0 0 if $target->can($key)