Branch Coverage

blib/lib/Text/ZPL.pm
Criterion Covered Total %
branch 54 56 96.4


line true false branch
21 0 15 unless defined $_[0]
32 6 81 unless _decode_prepare_line($line)
36 52 26 if ((my $sep_pos = index($line, '=')) > 0) { }
24 2 elsif (my($subsect) = $line =~ /^(?:\s+)?($ValidName)(?:\s+?#.*)?$/) { }
67 1 136 if ($cur_indent % 4)
73 58 78 if ($cur_indent == 0) { }
36 42 elsif ($cur_indent > $_[4]) { }
8 34 elsif ($cur_indent < $_[4]) { }
78 3 33 unless (defined $_[5][$cur_indent / 4 - 1])
93 1 40 if (exists $_[1]{$_[2]})
109 1 89 unless ($key =~ /^$ValidName$/)
119 16 73 if ($maybe_q eq q['] || $maybe_q eq '"' and (my $matching_q_pos = index($tmpval, $maybe_q, 1)) > 1) { }
127 7 66 $maybe_trailing > -1 ? :
133 1 88 if (length $tmpval)
145 15 73 if (exists $_[1]{$_[2]})
146 9 6 if (not ref $_[1]{$_[2]}) { }
5 1 elsif (ref $_[1]{$_[2]} eq 'ARRAY') { }
1 0 elsif (ref $_[1]{$_[2]} eq 'HASH') { }
162 2 15 if &blessed($obj) and $obj->can('TO_ZPL')
163 2 15 unless ref $obj eq 'HASH'
173 2 38 unless $key =~ qr/^$ValidName$/
177 2 36 if (&blessed($val) and $val->can('TO_ZPL'))
181 5 33 if (ref $val eq 'ARRAY')
186 9 24 if (ref $val eq 'HASH')
193 1 23 if (ref $val)
208 1 10 if ref $item
218 1 32 if index($val, '"') > -1 and index($val, q[']) == -1
221 6 23 if index($val, '#') > -1 or index($val, '=') > -1 or index($val, q[']) > -1 and index($val, '"') == -1 or $val =~ /\s/