Branch Coverage

blib/lib/Template/EmbeddedPerl.pm
Criterion Covered Total %
branch 64 96 66.6


line true false branch
100 13 2 if ((builtin::blessed($string) || '') eq 'Template::EmbeddedPerl::SafeString') { }
111 0 0 if ((builtin::blessed($string) || '') eq 'Template::EmbeddedPerl::SafeString') { }
123 0 0 @_ ? :
153 0 10 if $class->can("config")
165 36 56 if ($self->{'sandbox_ns'}->can($helper))
167 0 36 if $ENV{'DEBUG_TEMPLATE_EMBEDDED_PERL'}
173 0 56 if $@
179 31 113 unless $self->{'helpers'}
181 0 144 if $self->can("helpers")
183 134 10 if defined $helper
201 1 35 if (builtin::blessed($_) and $_->can('to_safe_string')) { }
214 63 0 ref $proto ? :
217 0 63 if ($self->{'use_cache'})
219 0 0 if (my $cached = $self->{'compiled_cache'}{$digest})
237 0 61 if ($self->{'use_cache'})
257 0 2 if ($@)
262 2 0 if (defined $data_handle) { }
285 0 0 ref $proto ? :
290 0 0 if (ref $dir || '') eq "ARRAY"
292 0 0 if (-e $path)
293 0 0 unless open my $fh, "<", $path
339 136 75 if (not $open_type) { }
350 52 84 if ($self->{'interpolation'}) { }
361 39 2 if ($match_start > $pos)
373 52 0 if ($pos < length $segment)
384 2 73 if $close_type eq "$expr_marker$close_tag"
395 28 47 if ($open_type eq "$open_tag$expr_marker") { }
47 0 elsif ($open_type eq $open_tag) { }
413 5 58 if ($self->{'auto_escape'} and $self->{'auto_flatten_expr'}) { }
416 0 58 $self->{'auto_escape'} ? :
417 58 0 $self->{'auto_flatten_expr'} ? :
421 0 291 if $block eq ""
424 69 222 if ($type eq 'expr') { }
47 175 elsif ($type eq 'code') { }
434 42 133 $escaped_newline_start ? :
13 162 $escaped_newline_end ? :
440 0 63 if $ENV{'DEBUG_TEMPLATE_EMBEDDED_PERL'}
442 2 61 if ($@)
480 23 0 if ($parent and $parent->isa('PPI::Statement::Compound') || $parent->isa('PPI::Statement'))
482 21 2 if ($keyword and $keyword->isa("PPI::Token::Word"))
484 14 7 if $keyword->content =~ /^(if|else|elsif|while|for|foreach|unless|given|when|until)$/
494 53 22 unless $blocks
498 3 23 if $block->finish
499 14 9 if is_control_block($block)
502 0 9 unless $block->{'children'}
528 52 23 unless $blocks
531 4 24 if $block eq ")"
532 0 24 unless $block->{'children'}