Branch Coverage

blib/lib/Text/Hogan/Compiler.pm
Criterion Covered Total %
branch 58 70 82.8


line true false branch
53 337 261 if (length $buf > 0)
65 123 103 unless ($is_all_whitespace)
77 64 237 if ($have_seen_tag and &$line_is_whitespace()) { }
99 138 elsif (not $no_new_line) { }
79 25 40 if ($tokens[$j]{'text'})
80 3 22 if ($next = $tokens[$j + 1] and $next->{'tag'} eq '>')
128 5 140 if ($options->{'delimiters'})
135 1814 2274 if ($state eq $IN_TEXT) { }
297 1977 elsif ($state eq $IN_TAG_TYPE) { }
136 297 1517 if (tag_change($otag, $text, $i)) { }
142 156 1361 if (char_at($text, $i) eq "\n") { }
154 204 93 $tag ? :
155 16 281 if ($tag_type eq '=') { }
160 188 93 if ($tag)
168 281 1696 if (tag_change($ctag, $text, $i)) { }
169 69 212 $tag_type eq '/' ? :
179 12 269 if ($tag_type eq '{')
180 12 0 if ($ctag eq '}}') { }
202 0 0 if (substr($token->{'n'}, length($token->{'n'}) - 1) eq '}')
212 3212 579 if (char_at($text, $index) ne char_at($tag, 0))
217 1 552 if (char_at($text, $index + $i) ne char_at($tag, $i))
241 0 231 if ($tail and $tail->{'tag'} eq '<' and not $allowed_in_super{$token->{'tag'}})
245 69 623 if ($tags{$token->{'tag'}} and $tags{$token->{'tag'}} <= $tags{'$'} || is_opener($token, $custom_tags)) { }
69 554 elsif ($token->{'tag'} eq '/') { }
99 455 elsif ($token->{'tag'} eq "\n") { }
250 0 69 unless (@$stack)
254 0 69 if ($token->{'n'} ne $opener->{'n'} and not is_closer($token->{'n'}, $opener->{'n'}, $custom_tags))
267 0 145 if (@$stack)
278 0 0 if ($tags->[$i]{'o'} eq $token->{'n'})
291 0 0 if ($tags->[$i]{'c'} eq $close and $tags->[$i]{'o'} eq $open)
344 0 145 if ($options->{'as_string'})
407 9423 4344 if (XXX)
415 15 169 $s =~ /[.]/ ? :
508 13 610 unless my $func = $codegen{$node->{'tag'}}
537 15 144 if ($template)