Branch Coverage

blib/lib/Template/Liquid/Tag/For.pm
Criterion Covered Total %
branch 56 64 87.5


line true false branch
18 0 105 unless defined $args->{'template'}
24 0 105 unless defined $args->{'parent'}
31 0 105 unless defined $args->{'attrs'}
32 0 105 unless ($args->{'attrs'} =~ qr/^([\w\.]+)\s+in\s+(.+?)(?:\s+(.*)\s*?)?$/o)
41 14 91 $attr =~ s/^reversed\b//o ? :
53 83 0 if defined $_
78 14 93 exists $attr->{'sorted'} ? :
81 0 14 if defined $sorted and ($sorted ne "key" and $sorted ne "value")
85 24 83 defined $attr->{'offset'} ? :
89 26 81 defined $attr->{'limit'} ? :
97 16 91 if (ref $list eq 'HASH') { }
3 88 elsif (defined $sorted) { }
100 11 5 if defined $sorted
103 13 18 $Template::Liquid::Tag::For::a->{$sorted} =~ /^\d+$/o && $Template::Liquid::Tag::For::b->{$sorted} =~ /^\d+$/o ? :
109 24 0 $a =~ /^\d+$/ && $b =~ /^\d+$/ ? :
112 1 106 if (not eval {
2 104 elsif (ref $list eq 'ARRAY' and not @$list) { }
0 104 elsif (not defined $list && $list) { }
128 24 80 defined $offset ? :
129 12 14 defined $offset ? :
26 78 defined $limit ? :
133 4 100 if $max > $#$list
136 14 90 if $reversed
137 26 78 defined $limit ? :
138 24 80 defined $offset ? :
144 8 99 if $steps == -1
154 99 288 $index == 0 ? :
95 292 $index == $steps ? :
166 452 816 ref $node ? :
167 1266 2 defined $rendering ? :
168 4 1264 if ($s->{'template'}{'break'})
172 19 1245 if ($s->{'template'}{'continue'})