Condition Coverage

blib/lib/Mojo/Template.pm
Criterion Covered Total %
condition 67 76 88.1


and 2 conditions

line l !l condition
130 0 2639 push @tree, ["line"] and next
186 0 2264 push @blocks, "" and next

and 3 conditions

line !l l&&!r l&&r condition
65 26 3270 1483 $op eq "text" and $line =~ /$line_re/u
87 9020 2139 2113 $op ne "text" and $token =~ /$end_re/u
93 1273 2 838 $trimming = $2 and @tree > 1
118 8184 11 839 $trimming and $token =~ s/^(\s+)//u
130 217 2068 2494 $tree[-4] and $tree[-4][0] ne "line"
171 0 57 1 $encoding and not defined($template = decode($encoding, $template))
184 2 375 12384 ++$i <= @$tree and my $next = $tree->[$i]
204 1 6 119 $next->[0] ne "cpst" and ($next->[1] // "") =~ /^\s*$/u
211 14 192 1017 not $multi and $op eq 'escp' && !$escape || $op eq 'expr' && $escape
260 199 43 135 $self->vars and my(@vars) = grep({/^\w+$/u;} keys %$vars)

or 2 conditions

line l !l condition
10 0 55 $ENV{'MOJO_TEMPLATE_DEBUG'} || 0
187 9868 252 $value //= ""
204 125 0 $next->[1] // ""

or 3 conditions

line l !l&&r !l&&!r condition
78 4 36 4739 $line =~ s/\\\\$/\\\n/u or $line =~ s/\\$//u
130 129 8 2148 not $tree[-3] or $tree[-3][0] ne "text"
137 8 2140 not $tree[-3] or $tree[-3][0] ne "text" or not $tree[-3][1] =~ /\n$/u
2494 15 2270 $tree[-4] and $tree[-4][0] ne "line" or (not $tree[-3] or $tree[-3][0] ne "text" or not $tree[-3][1] =~ /\n$/u)
0 0 2140 $tree[-2][0] ne "line" or $tree[-1][0] ne "text"
16 0 2140 $tree[-4] and $tree[-4][0] ne "line" or (not $tree[-3] or $tree[-3][0] ne "text" or not $tree[-3][1] =~ /\n$/u) or ($tree[-2][0] ne "line" or $tree[-1][0] ne "text")
190 1765 14 1461 $op eq "code" or $multi
208 1161 62 8897 $op eq "expr" or $op eq "escp"
211 51 966 192 $op eq 'escp' && !$escape || $op eq 'expr' && $escape
219 0 14 1209 !$next || $next->[0] ne 'text'
222 14 58 1151 $multi or $capture
246 63 80 695 $tree->[-2][0] eq 'cpst' || $tree->[-2][0] eq 'cpen'