Branch Coverage

blib/lib/Data/Edit/Struct.pm
Criterion Covered Total %
branch 148 162 91.3


line true false branch
135 1 138 unless defined $action
138 1 137 unless defined(my $validator = $Validator{$action})
150 4 131 if ($action eq 'pop') { }
4 127 elsif ($action eq 'shift') { }
28 99 elsif ($action eq 'splice') { }
82 17 elsif ($action eq 'insert') { }
4 13 elsif ($action eq 'delete') { }
3 10 elsif ($action eq 'transform') { }
10 0 elsif ($action eq 'replace') { }
160 14 14 unless defined $src
168 1 81 unless defined $src
187 1 9 unless defined $src
191 1 8 if @$src > 1
228 31 106 unless defined $src
232 0 106 if ($src->$Data::Edit::Struct::_isa('Data::DPath::Context')) { }
236 92 14 unless (defined $spath)
238 86 6 if (XXX or XXX) { }
256 1 105 if (XXX) { }
3 102 elsif ($sxfrm eq 'array') { }
5 97 elsif ($sxfrm eq 'hash') { }
1 96 elsif ($sxfrm eq 'iterate') { }
269 1 4 if (exists $args->{'key'}) { }
272 0 1 if @$src > 1
289 6 1 defined $attrs->{'key'} ? :
1 6 unless defined(my $key = defined $attrs->{'key'} ? $attrs->{'key'} : $attrs->{'idx'})
308 1 95 if @$src > 1
337 83 2 XXX || XXX ? :
85 24 if $stype eq 'auto'
342 12 97 if ($stype eq 'element') { }
97 0 elsif ($stype eq 'container') { }
348 3 0 XXX ? :
94 3 XXX ? :
360 1 108 unless XXX or not $clone
363 0 108 $clone ? :
1 108 XXX ? :
377 1 3 unless XXX
381 1 2 if $length > @$dest
395 1 3 unless XXX
416 15 13 defined $attrs && $point->$attrs ? :
420 9 19 if ($use eq 'auto')
424 6 1 defined $idx ? :
2 7 XXX ? :
431 13 14 if ($use eq 'container') { }
14 0 elsif ($use eq 'element') { }
432 11 2 unless defined $ref
433 3 10 unless XXX
443 13 1 defined $rparent ? :
448 2 12 unless defined $$parent and XXX
475 14 67 if ($dtype eq 'auto')
483 5 0 defined($attrs = $point->can('attrs')) && defined($idx = $point->attrs->{'idx'}) ? :
9 5 XXX || XXX ? :
488 36 45 if ($use eq 'container') { }
45 0 elsif ($use eq 'element') { }
490 27 9 unless defined $ref
492 4 32 if (XXX) { }
31 1 elsif (XXX) { }
494 1 3 if @$src % 2
514 44 1 defined $rparent ? :
519 2 43 unless defined $parent and XXX
524 0 38 defined $attrs ? :
38 5 unless defined $idx
545 20 54 if ($anchor eq 'first') { }
11 43 elsif ($anchor eq 'last') { }
43 0 elsif ($anchor eq 'index') { }
566 42 32 if ($insert eq 'before') { }
32 0 elsif ($insert eq 'after') { }
568 4 38 if ($idx < 0) { }
5 33 elsif ($idx > $maxidx + 1) { }
580 10 22 if ($idx < 0) { }
5 17 elsif ($idx > $maxidx) { }
581 5 5 if $idx < -1
612 3 1 defined $rparent ? :
617 1 3 unless defined $parent
623 1 2 if (defined(my $key = $attr->{'key'})) { }
2 0 elsif (exists $attr->{'idx'}) { }
648 4 4 if $replace eq 'auto'
651 4 4 if ($replace eq 'value') { }
4 0 elsif ($replace eq 'key') { }
658 3 1 defined $rparent ? :
663 2 2 unless XXX
669 1 1 XXX ? :