Branch Coverage

blib/lib/Template/Nest.pm
Criterion Covered Total %
branch 81 102 79.4


line true false branch
32 7 1 if (%opts)
34 0 39 unless defined $self->can($k)
45 0 87 if $dir and ref $dir
46 8 79 if $dir
54 2 2 if $template_hash
62 5 2 if ($defaults)
64 0 5 unless ref $defaults eq ref {}
76 10 20 if (defined $char)
77 7 3 if ($char eq '') { }
80 0 3 unless $char =~ /./
91 2 1 if (defined $delim1)
102 8 37 if (defined $delim1)
104 7 1 if (ref $delim1 eq ref [])
118 1 77 if $show and not $show == 0 || $show == 1
119 3 74 if defined $show
126 0 87 if defined $ext and ref $ext
127 8 79 if defined $ext
134 0 245 if defined $label and ref $label
135 8 237 if $label
143 7 2 if (defined $indent)
144 1 6 unless $indent == 0 or $indent == 1
155 6 2 if (defined $should_die)
156 1 5 unless $should_die == 0 or $should_die == 1
168 5 2 if (defined $char)
169 0 5 unless $char eq '' or $char =~ /./
182 14 120 if (ref($comp) =~ /array/i) { }
77 43 elsif (ref($comp) =~ /hash/i) { }
198 0 77 unless ref($h) =~ /hash/i
202 0 77 unless $template_name
207 76 83 if $k eq $self->name_label
214 8 64 if ($self->show_labels)
232 0 14 unless ref($arr) =~ /array/i
235 0 27 if $delim and $html
248 3 78 if ($self->{'template_hash'}) { }
258 0 78 unless open $fh, '<', $filename
306 76 101 unless defined $param_name
309 177 0 if ($esc)
322 75 0 if ($esc) { }
334 10 69 if ($self->{'fixed_indent'}) { }
345 10 0 if ($esc) { }
346 10 0 if $frags[$i] =~ s/(?
348 0 0 if $frags[$i] =~ s/\Q$repl\E/$param_out/
355 65 12 if $frags[$i] =~ s/$rx/$param_val/g
359 3 76 if ($self->{'die_on_bad_params'} and $replaced == 0)
366 18 58 if (%{$self->{'defaults'};})
371 11 3 if $char
383 72 0 if ($esc)
389 72 0 $esc ? :
402 18 0 if ($esc) { }
421 12 13 if (@parts == 1) { }
427 2 11 unless $new_ref