Branch Coverage

blib/lib/Template/Liquid/Tag/For.pm
Criterion Covered Total %
branch 53 60 88.3


line true false branch
18 0 103 unless defined $args->{'template'}
24 0 103 unless defined $args->{'parent'}
31 0 103 unless defined $args->{'attrs'}
32 0 103 unless ($args->{'attrs'} =~ qr/^([\w\.]+)\s+in\s+(.+?)(?:\s+(.*)\s*?)?$/o)
41 14 89 $attr =~ s/^reversed\b//o ? :
53 83 0 if defined $_
78 14 91 exists $attr->{'sorted'} ? :
81 0 14 if defined $sorted and ($sorted ne "key" and $sorted ne "value")
85 24 81 defined $attr->{'offset'} ? :
89 26 79 defined $attr->{'limit'} ? :
97 16 89 if (ref $list eq 'HASH') { }
3 86 elsif (defined $sorted) { }
100 11 5 if defined $sorted
103 13 17 $Template::Liquid::Tag::For::a->{$sorted} =~ /^\d+$/o && $Template::Liquid::Tag::For::b->{$sorted} =~ /^\d+$/o ? :
109 24 0 $a =~ /^\d+$/ && $b =~ /^\d+$/ ? :
112 2 103 if (not defined $list && $list && @$list) { }
117 24 79 defined $offset ? :
118 12 14 defined $offset ? :
26 77 defined $limit ? :
122 4 99 if $max > $#$list
125 14 89 if $reversed
126 26 77 defined $limit ? :
127 24 79 defined $offset ? :
133 8 97 if $steps == -1
143 97 287 $index == 0 ? :
93 291 $index == $steps ? :
155 449 810 ref $node ? :
156 1257 2 defined $rendering ? :
157 4 1255 if ($s->{'template'}{'break'})
161 19 1236 if ($s->{'template'}{'continue'})