Branch Coverage

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


line true false branch
52 337 261 if (length $buf > 0)
64 123 103 unless ($is_all_whitespace)
76 64 237 if ($have_seen_tag and &$line_is_whitespace()) { }
99 138 elsif (not $no_new_line) { }
78 25 40 if ($tokens[$j]{'text'})
79 3 22 if ($next = $tokens[$j + 1] and $next->{'tag'} eq '>')
127 5 140 if ($options->{'delimiters'})
134 1814 2274 if ($state eq $IN_TEXT) { }
297 1977 elsif ($state eq $IN_TAG_TYPE) { }
135 297 1517 if (tag_change($otag, $text, $i)) { }
141 156 1361 if (char_at($text, $i) eq "\n") { }
153 204 93 $tag ? :
154 16 281 if ($tag_type eq '=') { }
159 188 93 if ($tag)
167 281 1696 if (tag_change($ctag, $text, $i)) { }
168 69 212 $tag_type eq '/' ? :
178 12 269 if ($tag_type eq '{')
179 12 0 if ($ctag eq '}}') { }
201 0 0 if (substr($token->{'n'}, length($token->{'n'}) - 1) eq '}')
211 3212 579 if (char_at($text, $index) ne char_at($tag, 0))
216 1 552 if (char_at($text, $index + $i) ne char_at($tag, $i))
240 0 231 if ($tail and $tail->{'tag'} eq '<' and not $allowed_in_super{$token->{'tag'}})
244 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") { }
249 0 69 unless (@$stack)
253 0 69 if ($token->{'n'} ne $opener->{'n'} and not is_closer($token->{'n'}, $opener->{'n'}, $custom_tags))
266 0 145 if (@$stack)
277 0 0 if ($tags->[$i]{'o'} eq $token->{'n'})
290 0 0 if ($tags->[$i]{'c'} eq $close and $tags->[$i]{'o'} eq $open)
343 0 145 if ($options->{'as_string'})
406 9423 4344 if (ref $text eq 'ARRAY') { }
416 15 169 $s =~ /[.]/ ? :
509 13 610 unless my $func = $codegen{$node->{'tag'}}
538 15 144 if ($template)