Branch Coverage

blib/lib/Template/Nest.pm
Criterion Covered Total %
branch 88 112 78.5


line true false branch
34 9 1 if (%opts)
36 0 48 unless defined $self->can($k)
47 0 98 if $dir and ref $dir
48 10 88 if $dir
56 2 2 if $template_hash
64 5 2 if ($defaults)
66 0 5 unless ref $defaults eq ref {}
77 4 0 if (defined $token)
85 1 0 if (defined $enc)
94 10 20 if (defined $char)
95 7 3 if ($char eq '') { }
98 0 3 unless $char =~ /./
109 2 1 if (defined $delim1)
120 10 53 if (defined $delim1)
122 9 1 if (ref $delim1 eq ref [])
136 1 86 if $show and not $show == 0 || $show == 1
137 3 83 if defined $show
144 0 98 if defined $ext and ref $ext
145 10 88 if defined $ext
152 0 268 if defined $label and ref $label
153 9 259 if $label
161 7 2 if (defined $indent)
162 1 6 unless $indent == 0 or $indent == 1
173 6 2 if (defined $should_die)
174 1 5 unless $should_die == 0 or $should_die == 1
186 5 2 if (defined $char)
187 0 5 unless $char eq "" or $char =~ /./
200 15 130 if (ref($comp) =~ /array/i) { }
86 44 elsif (ref($comp) =~ /hash/i) { }
216 0 86 unless ref($h) =~ /hash/i
220 0 86 unless $template_name
225 85 87 if $k eq $self->name_label
232 8 73 if ($self->show_labels)
250 0 15 unless ref($arr) =~ /array/i
253 0 29 if $delim and $html
266 3 87 if ($self->{'template_hash'}) { }
276 1 86 if ($self->{'file_encoding'}) { }
277 0 1 unless open $fh, "<:encoding($self->{'file_encoding'})", $filename
280 0 86 unless open $fh, "<", $filename
330 85 118 unless defined $param_name
333 203 0 if ($esc)
346 84 0 if ($esc) { }
358 10 73 if ($self->{'fixed_indent'}) { }
369 10 0 if ($esc) { }
370 10 0 if $frags[$i] =~ s/(?
372 0 0 if $frags[$i] =~ s/\Q$repl\E/$param_out/
379 69 12 if $frags[$i] =~ s/$rx/$param_val/g
383 3 80 if ($self->{'die_on_bad_params'} and $replaced == 0)
390 18 67 if (%{$self->{'defaults'};})
395 11 3 if $char
405 8 77 if ($self->{'token_placeholder'})
424 81 0 if ($esc)
430 81 0 $esc ? :
443 26 0 if ($esc) { }
462 12 13 if (@parts == 1) { }
468 2 11 unless $new_ref