Branch Coverage

blib/lib/Template/Liquid/Condition.pm
Criterion Covered Total %
branch 67 96 69.7


line true false branch
18 0 275 unless defined $args->{'template'}
24 0 275 unless defined $args->{'parent'}
26 275 0 defined $args->{'attrs'} ? :
29 275 0 if (defined $lval)
30 129 146 if (not defined $rval || defined $condition) { }
146 0 elsif ($condition =~ /^(?:eq|==|ne|!=|lt|<|gt|>|contains|&&|\|\|)$/o) { }
40 84 62 if $condition eq "=="
41 19 127 if $condition eq "!="
42 17 129 if $condition eq ">"
43 10 136 if $condition eq "<"
44 0 146 if $condition eq "&&"
45 0 146 if $condition eq "and"
46 0 146 if $condition eq "||"
47 0 146 if $condition eq "or"
60 0 0 defined $rval ? :
85 150 129 if defined $_l
86 152 127 if defined $_r
93 2 297 if $ref_l ne ref $r
94 285 12 if (not $ref_l) { }
6 6 elsif ($ref_l eq 'ARRAY') { }
6 0 elsif ($ref_l eq 'HASH') { }
97 135 150 grep({/\D/o;} $l, $r) ? :
285 0 !!grep({defined $_;} $l, $r) ? :
103 2 4 unless scalar @$l == scalar @$r
105 2 14 unless _equal($l->[$index], $r->[$index])
115 4 0 defined $temp{$key} ? :
2 2 unless exists $temp{$key} and defined $l->{$key} eq defined $temp{$key} and defined $temp{$key} ? _equal($temp{$key}, $l->{$key}) : Deparse error: Can't locate object method "object_2svref" via package "B::SPECIAL" at /usr/local/lib/perl5/5.26.1/B/Deparse.pm line 5018.
125 7 91 unless $s->{'template'}{'context'}->get($_)
131 43 6 if defined $_l
132 49 0 if defined $_r
135 6 43 grep({/\D/o;} $l, $r) ? :
49 0 !!grep({defined $_;} $l, $r) ? :
150 0 12 if defined $_l
151 0 12 if defined $_r
153 0 12 if defined $r and not defined $l
154 2 2 defined $l->{$r} ? :
4 8 if ref $l eq "HASH"
155 2 2 grep({$_ eq $r;} @$l) ? :
4 4 if ref $l eq "ARRAY"
156 2 2 $l =~ qr/$r/ ? :
167 0 0 if defined $_l
168 0 0 if defined $_r
180 0 0 if defined $_l
181 0 0 if defined $_r
203 28 0 unless (defined $s->{'condition'} or defined $s->{'rvalue'})
208 11 17 if defined $_l
209 16 12 !!$l ? :
215 0 388 unless $condition