Branch Coverage

blib/lib/Text/MustacheTemplate/Compiler.pm
Criterion Covered Total %
branch 124 136 100.0


line true false branch
31 0 527 unless @$ast
36 0 527 if ($type != 5)
47 1 526 if @ast == 0
50 134 392 if (@ast == 1 and $ast[0][0] == 0)
52 17 117 if (not @CONTEXT_HINT and $text =~ /[\r\n](?!\z)/amno)
54 8 9 defined $_PADDING ? :
68 0 392 if "$@"
81 0 392 if $@
91 1155 867 if ($syntax->[0] == 0) { }
30 837 elsif ($syntax->[0] == 3) { }
35 802 elsif ($syntax->[0] == 5) { }
92 135 1020 if ($raw_text_syntax) { }
103 209 593 if (@CONTEXT_HINT and $depth == 0)
104 68 141 if ($syntax->[0] == 1) { }
107 34 elsif ($syntax->[0] == 2) { }
109 23 45 if $Text::MustacheTemplate::LAMBDA_TEMPLATE_RENDERING
111 5 63 $name eq '.' ? :
112 8 60 unless $value
113 40 20 if ($type == 0) { }
20 0 elsif ($type == 1) { }
121 54 6 if ($raw_text_syntax) { }
129 55 52 if ($type == 0) { }
28 24 elsif ($type == 1) { }
133 7 48 if $Text::MustacheTemplate::LAMBDA_TEMPLATE_RENDERING
134 2 53 $name eq '.' ? :
7 48 unless $name eq "." ? evaluate_section($_CTX[-1]) : evaluate_section_variable(\@_CTX, split(/\./ano, $name, 0))
139 1 27 if $Text::MustacheTemplate::LAMBDA_TEMPLATE_RENDERING
140 1 27 $name eq '.' ? :
7 21 if $name eq "." ? evaluate_section($_CTX[-1]) : evaluate_section_variable(\@_CTX, split(/\./ano, $name, 0))
145 387 333 if ($raw_text_syntax)
149 338 382 if ($syntax->[0] == 2)
157 639 226 if ($raw_text_syntax)
168 244 186 if ($ast->[0][0] == 0 and not $ast->[0][1] =~ /[\r\n]/amno)
181 392 38 if $indent == 4
200 648 755 if ($type == 0) { }
303 452 elsif ($type == 1) { }
35 417 elsif ($type == 5) { }
338 79 elsif ($type == 2) { }
79 0 elsif ($type == 4) { }
0 0 elsif ($type == 3) { }
202 11 637 if $result eq "##DISCARD##"
203 466 171 $i == $#{$ast;} ? :
109 528 if ($i == $#{$ast;} ? $text =~ /[\r\n](?!\z)/amno : $text =~ /[\r\n]/amno) { }
205 29 80 if $i == $#{$ast;}
221 13 66 if $padding
224 1 45 $name eq '.' ? :
33 0 $reference == 0 ? :
46 33 $reference == 1 ? :
230 66 13 unless $padding
231 13 66 if $padding
247 264 39 if ($type == 0) { }
39 0 elsif ($type == 1) { }
248 21 243 $name eq '.' ? :
251 6 33 $name eq '.' ? :
262 135 203 if ($type == 0) { }
55 148 elsif ($type == 1) { }
98 50 elsif ($type == 2) { }
50 0 elsif ($type == 3) { }
266 51 84 $no_lambda ? :
267 5 130 $name eq '.' ? :
270 51 84 if ($no_lambda)
271 3 48 if $name eq "."
301 1 54 $name eq '.' ? :
311 60 38 unless ($_PARENT)
332 1 1 $name eq '.' ? :
48 0 $reference == 0 ? :
2 48 $reference == 1 ? :
355 18 13 unless ($source =~ /(?:\Q$_OPEN_DELIMITER\E|\Q$_CLOSE_DELIMITER\E)/amn)