Branch Coverage

blib/lib/Template/Stash/Context.pm
Criterion Covered Total %
branch 57 140 40.7


line true false branch
126 1 0 ref $_[0] eq 'HASH' ? :
168 0 3 if (defined $import and UNIVERSAL::isa($import, 'HASH')) { }
182 0 3 if defined $import
202 0 3 unless $$self{'_PARENT'}
226 11 4 if (ref $ident eq 'ARRAY' or $ident =~ /\./ and $ident = [map({s/\(.*$//; $_, 0;} split(/\./, $ident, 0))]) { }
236 2 18 if ($i + 2 <= $size and $$ident[$i + 2] eq 'scalar' || $$ident[$i + 2] eq 'ref') { }
244 0 20 unless defined $result
252 12 3 defined $result ? :
280 1 6 if (ref $ident eq 'ARRAY' or $ident =~ /\./ and $ident = [map({s/\(.*$//; $_, 0;} split(/\./, $ident, 0))]) { }
292 0 1 unless defined $result
305 7 0 defined $result ? :
322 0 0 if (ref $ident eq 'ARRAY') { }
327 0 0 if $i >= $size - 2
329 0 0 unless defined($root = $self->_dotop($root, $item, $args))
336 0 0 if (defined $root) { }
337 0 0 unless $args
361 0 3 if (defined $import and UNIVERSAL::isa($import, 'HASH'))
402 1 24 if $nextItem eq 'scalar'
403 1 24 if $nextItem eq 'ref'
414 0 25 unless defined $root and defined $item and not $item =~ /^[\._]/
416 0 0 if (ref \$root eq 'SCALAR' and not $lvalue and ($value = $$LIST_OPS{$item}) || $item =~ /^-?\d+$/)
424 24 1 if ($rootref eq $$self{'_CLASS'} or $rootref eq 'HASH') { }
1 0 elsif ($rootref eq 'ARRAY') { }
0 0 elsif (ref $root and UNIVERSAL::can($root, 'can')) { }
0 0 elsif ($value = $$SCALAR_OPS{$item} and not $lvalue) { }
0 0 elsif ($$self{'_DEBUG'}) { }
432 21 3 if (defined($value = $$root{$item})) { }
0 3 elsif ($lvalue) { }
0 3 elsif ($value = $$HASH_OPS{$item}) { }
0 3 elsif (ref $item eq 'ARRAY') { }
0 3 elsif ($value = $$SCALAR_OPS{$item}) { }
435 15 6 if $ret
463 1 0 if ($value = $$LIST_OPS{$item} and not $lvalue) { }
0 0 elsif ($value = $$SCALAR_OPS{$item} and not $lvalue) { }
0 0 elsif ($item =~ /^-?\d+$/) { }
0 0 elsif (ref $item eq 'ARRAY') { }
478 0 0 if $ret
496 0 0 if $returnRef
498 0 0 $scalarContext ? :
502 0 0 if ($@)
504 0 0 if (UNIVERSAL::isa($root, 'HASH') and defined($value = $$root{$item})) { }
0 0 elsif (UNIVERSAL::isa($root, 'ARRAY') and $value = $$LIST_OPS{$item}) { }
508 0 0 if $ret
535 7 3 if (defined $result[0]) { }
0 3 elsif (defined $result[1]) { }
0 3 elsif ($$self{'_DEBUG'}) { }
536 0 0 @result > 1 ? :
0 7 if $returnRef
538 1 6 if ($scalarContext) { }
539 0 1 if @result > 1
540 0 1 if ref $result[0] eq 'ARRAY'
541 0 1 if ref $result[0] eq 'HASH'
544 1 5 @result > 1 ? :
569 1 20 if $returnRef
570 1 19 if ($scalarContext) { }
571 0 1 if ref $value eq 'ARRAY'
572 0 1 if ref $value eq 'HASH'
573 0 1 unless ref $value eq 'CODE'
576 14 5 unless ref $value eq 'CODE'
608 0 7 unless $root and defined $item and not $item =~ /^[\._]/
610 7 0 if ($rootref eq 'HASH' or $rootref eq $$self{'_CLASS'}) { }
0 0 elsif ($rootref eq 'ARRAY' and $item =~ /^-?\d+$/) { }
0 0 elsif (UNIVERSAL::isa($root, 'UNIVERSAL')) { }
612 7 0 unless $default and $$root{$item}
617 0 0 unless $default and $$root{$item}
650 0 0 if $indent > 32
656 0 0 unless defined $value
658 0 0 if (ref $value eq 'ARRAY')
662 0 0 if $key =~ /^\./
663 0 0 if (UNIVERSAL::isa($value, 'HASH'))