Branch Coverage

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


line true false branch
18 0 265 unless defined $args->{'template'}
24 0 265 unless defined $args->{'parent'}
26 265 0 defined $args->{'attrs'} ? :
28 265 0 if (defined $lval)
29 127 138 if (not defined $rval || defined $condition) { }
138 0 elsif ($condition =~ /^(?:eq|==|ne|!=|lt|<|gt|>|contains|&&|\|\|)$/o) { }
39 81 57 if $condition eq "=="
40 16 122 if $condition eq "!="
41 17 121 if $condition eq ">"
42 8 130 if $condition eq "<"
43 0 138 if $condition eq "&&"
44 0 138 if $condition eq "and"
45 0 138 if $condition eq "||"
46 0 138 if $condition eq "or"
60 0 0 defined $rval ? :
82 137 126 if defined $_l
83 139 124 if defined $_r
90 2 281 if $ref_l ne ref $r
91 269 12 if (not $ref_l) { }
6 6 elsif ($ref_l eq 'ARRAY') { }
6 0 elsif ($ref_l eq 'HASH') { }
94 132 137 grep({/\D/o;} $l, $r) ? :
269 0 !!grep({defined $_;} $l, $r) ? :
100 2 4 unless scalar @$l == scalar @$r
102 2 14 unless _equal($l->[$index], $r->[$index])
112 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.
122 6 84 unless $s->{'template'}{'context'}->get($_)
128 39 6 if defined $_l
129 45 0 if defined $_r
132 6 39 grep({/\D/o;} $l, $r) ? :
45 0 !!grep({defined $_;} $l, $r) ? :
147 0 12 if defined $_l
148 0 12 if defined $_r
150 0 12 if defined $r and not defined $l
151 2 2 defined $l->{$r} ? :
4 8 if ref $l eq "HASH"
152 2 2 grep({$_ eq $r;} @$l) ? :
4 4 if ref $l eq "ARRAY"
153 2 2 $l =~ qr/$r/ ? :
164 0 0 if defined $_l
165 0 0 if defined $_r
177 0 0 if defined $_l
178 0 0 if defined $_r
200 28 0 unless (defined $s->{'condition'} or defined $s->{'rvalue'})
205 11 17 if defined $_l
206 16 12 !!$l ? :
212 0 378 unless $condition