Branch Coverage

blib/lib/Text/ZPL.pm
Criterion Covered Total %
branch 55 58 94.8


line true false branch
23 0 15 unless defined $str
35 6 81 unless _decode_prepare_line($line)
41 52 26 if ((my $sep_pos = index($line, '=')) > 0)
48 24 2 if (my($subsect) = $line =~ /^(?:\s+)?($ValidName)(?:\s+?#.*)?$/)
63 18 137 length $_[0] == 0 || $_[0] =~ /^(?:\s+)?#/ ? :
75 1 136 if ($cur_indent % 4)
81 58 78 if ($cur_indent == 0) { }
36 42 elsif ($cur_indent > $_[4]) { }
7 35 elsif ($cur_indent < $_[4]) { }
86 3 33 unless (defined $_[5][$cur_indent / 4 - 1])
93 0 7 unless (defined $wanted_ref)
106 1 40 if (exists $_[1]{$_[2]})
122 1 89 unless ($key =~ /^$ValidName$/)
131 16 73 if ($maybe_q eq q['] || $maybe_q eq '"' and (my $matching_q_pos = index($tmpval, $maybe_q, 1)) > 1) { }
139 7 66 $maybe_trailing > -1 ? :
146 1 88 if (length $tmpval)
158 15 73 if (exists $_[1]{$_[2]})
159 1 14 if (ref $_[1]{$_[2]} eq 'HASH') { }
5 9 elsif (ref $_[1]{$_[2]} eq 'ARRAY') { }
175 2 7 if blessed $obj and $obj->can('TO_ZPL')
176 1 8 unless ref $obj eq 'HASH'
186 2 31 unless $key =~ qr/^$ValidName$/
190 2 29 if (blessed $val and $val->can('TO_ZPL'))
194 5 26 if (ref $val eq 'ARRAY')
199 9 17 if (ref $val eq 'HASH')
206 1 16 if (ref $val)
221 1 10 if ref $item
231 0 26 if index($val, '"') > -1 and index($val, q[']) == -1
234 3 22 if index($val, '#') > -1 or index($val, '=') > -1 or index($val, q[']) > -1 and index($val, '"') == -1 or $val =~ /\s/