Condition Coverage

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


and 2 conditions

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

and 3 conditions

line !l l&&!r l&&r condition
65 26 2937 1386 $op eq "text" and $line =~ /$line_re/u
87 8350 2019 1993 $op ne "text" and $token =~ /$end_re/u
93 1206 2 785 $trimming = $2 and @tree > 1
118 7567 11 786 $trimming and $token =~ s/^(\s+)//u
130 219 1788 2342 $tree[-4] and $tree[-4][0] ne "line"
171 0 56 1 $encoding and not defined($template = decode($encoding, $template))
184 2 375 11661 ++$i <= @$tree and my $next = $tree->[$i]
204 1 6 115 $next->[0] ne "cpst" and ($next->[1] // "") =~ /^\s*$/u
211 14 192 950 not $multi and $op eq 'escp' && !$escape || $op eq 'expr' && $escape
260 200 43 134 $self->vars and my(@vars) = grep({/^\w+$/u;} keys %$vars)

or 2 conditions

line l !l condition
10 0 52 $ENV{'MOJO_TEMPLATE_DEBUG'} || 0
187 9304 244 $value //= ""
204 121 0 $next->[1] // ""

or 3 conditions

line l !l&&r !l&&!r condition
78 4 36 4309 $line =~ s/\\\\$/\\\n/u or $line =~ s/\\$//u
130 130 8 1869 not $tree[-3] or $tree[-3][0] ne "text"
138 8 1861 not $tree[-3] or $tree[-3][0] ne "text" or not $tree[-3][1] =~ /\n$/u
2342 15 1992 $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 1861 $tree[-2][0] ne "line" or $tree[-1][0] ne "text"
16 0 1861 $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 1659 14 1386 $op eq "code" or $multi
208 1094 62 8392 $op eq "expr" or $op eq "escp"
211 51 899 192 $op eq 'escp' && !$escape || $op eq 'expr' && $escape
219 0 14 1142 !$next || $next->[0] ne 'text'
222 14 57 1085 $multi or $capture
246 60 76 649 $tree->[-2][0] eq 'cpst' || $tree->[-2][0] eq 'cpen'