Branch Coverage

lib/Template/Stash.pm
Criterion Covered Total %
branch 98 148 66.2


line true false branch
78 1 7 if ($type =~ /^scalar|item$/) { }
3 4 elsif ($type eq 'hash') { }
4 0 elsif ($type =~ /^list|array$/) { }
113 157 0 ref $_[0] eq 'HASH' ? :
154 1 1491 if (defined $import and ref $import eq 'HASH') { }
168 1 1491 if defined $import
188 0 1492 unless $$self{'_PARENT'}
212 305 291 if (ref $ident eq 'ARRAY' or $ident =~ /\./ and $ident = [map({s/\(.*$//; $_, 0;} split(/\./, $ident, 0))]) { }
223 8 664 unless defined $result
231 401 192 defined $result ? :
259 9 482 if (ref $ident eq 'ARRAY' or $ident =~ /\./ and $ident = [map({s/\(.*$//; $_, 0;} split(/\./, $ident, 0))]) { }
271 0 11 unless defined $result
284 490 1 defined $result ? :
300 3 3 if (ref $ident eq 'ARRAY') { }
305 3 3 if $i >= $size - 2
307 0 3 unless defined($root = $self->_dotop($root, $item, $args))
314 6 0 if (defined $root) { }
315 8 3 unless $args
339 1 1301 if (defined $import and ref $import eq 'HASH')
358 11 1428 if ($$self{'_STRICT'}) { }
367 11 0 if $$self{'_STRICT'}
378 4 7 ref $ident eq 'ARRAY' ? :
383 2 2 /^\d+$/ ? :
2 13 if $args and ref $args eq 'ARRAY'
432 0 1001 unless defined $root and defined $item
435 0 1001 if $PRIVATE and $item =~ /$PRIVATE/
437 726 275 if ($atroot or $rootref eq 'HASH') { }
147 128 elsif ($rootref eq 'ARRAY') { }
37 91 elsif (blessed $root and $root->can('can')) { }
90 1 elsif ($value = $$SCALAR_OPS{$item} and not $lvalue) { }
1 0 elsif ($value = $$LIST_OPS{$item} and not $lvalue) { }
0 0 elsif ($$self{'_DEBUG'}) { }
444 485 241 if (defined($value = $$root{$item})) { }
1 240 elsif ($lvalue) { }
38 202 elsif ($value = $$HASH_OPS{$item} and not $atroot or $item eq 'import') { }
2 200 elsif (ref $item eq 'ARRAY') { }
445 468 17 unless ref $value eq 'CODE'
465 138 9 if ($value = $$LIST_OPS{$item}) { }
8 1 elsif ($item =~ /^-?\d+$/) { }
1 0 elsif (ref $item eq 'ARRAY') { }
470 8 0 unless ref $value eq 'CODE'
493 12 25 if ($@)
500 1 11 if ref $@ or not $@ =~ /Can't locate object method "\Q$item\E" via package "\Q$class\E"/
503 6 5 if (reftype $root eq 'HASH') { }
5 0 elsif (reftype $root eq 'ARRAY') { }
0 0 elsif ($value = $$SCALAR_OPS{$item}) { }
0 0 elsif ($value = $$LIST_OPS{$item}) { }
0 0 elsif ($$self{'_DEBUG'}) { }
504 3 3 if (defined($value = $$root{$item})) { }
2 1 elsif ($value = $$HASH_OPS{$item}) { }
1 0 elsif ($value = $$LIST_OPS{$item}) { }
505 3 0 unless ref $value eq 'CODE'
516 3 2 if ($value = $$LIST_OPS{$item}) { }
2 0 elsif ($item =~ /^-?\d+$/) { }
0 0 elsif (ref $item eq 'ARRAY') { }
521 2 0 unless ref $value eq 'CODE'
559 311 204 if (defined $result[0]) { }
0 204 elsif (defined $result[1]) { }
2 202 elsif ($$self{'_DEBUG'}) { }
561 0 311 scalar @result > 1 ? :
594 0 491 unless $root and defined $item
597 0 491 if $PRIVATE and $item =~ /$PRIVATE/
599 490 1 if ($rootref eq 'HASH' or $atroot) { }
1 0 elsif ($rootref eq 'ARRAY' and $item =~ /^-?\d+$/) { }
0 0 elsif (blessed $root) { }
601 490 0 unless $default and $$root{$item}
606 1 0 unless $default and $$root{$item}
612 0 0 unless $default and $root->$item
662 0 0 if $indent > 32
667 0 0 unless defined $value
668 0 0 if $key =~ /^\./
669 0 0 if (ref $value eq 'ARRAY') { }
0 0 elsif (ref $value eq 'HASH') { }
670 0 0 defined $_ ? :