Condition Coverage

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


and 2 conditions

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

and 3 conditions

line !l l&&!r l&&r condition
65 26 2548 1272 $op eq "text" and $line =~ /$line_re/u
87 7569 1880 1854 $op ne "text" and $token =~ /$end_re/u
93 1120 2 732 $trimming = $2 and @tree > 1
118 6839 11 733 $trimming and $token =~ s/^(\s+)//u
130 217 1463 2166 $tree[-4] and $tree[-4][0] ne "line"
171 0 55 1 $encoding and not defined($template = decode($encoding, $template))
184 2 371 10833 ++$i <= @$tree and my $next = $tree->[$i]
204 1 6 111 $next->[0] ne "cpst" and ($next->[1] // "") =~ /^\s*$/u
211 14 192 864 not $multi and $op eq 'escp' && !$escape || $op eq 'expr' && $escape
260 199 41 133 $self->vars and my(@vars) = grep({/^\w+$/u;} keys %$vars)

or 2 conditions

line l !l condition
10 0 51 $ENV{'MOJO_TEMPLATE_DEBUG'} || 0
187 8657 236 $value //= ""
204 117 0 $next->[1] // ""

or 3 conditions

line l !l&&r !l&&!r condition
78 4 36 3806 $line =~ s/\\\\$/\\\n/u or $line =~ s/\\$//u
130 129 8 1543 not $tree[-3] or $tree[-3][0] ne "text"
137 8 1535 not $tree[-3] or $tree[-3][0] ne "text" or not $tree[-3][1] =~ /\n$/u
2166 15 1665 $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 1535 $tree[-2][0] ne "line" or $tree[-1][0] ne "text"
16 0 1535 $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 1553 14 1292 $op eq "code" or $multi
208 1008 62 7823 $op eq "expr" or $op eq "escp"
211 51 813 192 $op eq 'escp' && !$escape || $op eq 'expr' && $escape
219 0 14 1056 !$next || $next->[0] ne 'text'
222 14 56 1000 $multi or $capture
246 57 72 603 $tree->[-2][0] eq 'cpst' || $tree->[-2][0] eq 'cpen'