Branch Coverage

blib/lib/Table/Readable.pm
Criterion Covered Total %
branch 40 46 86.9


line true false branch
15 1 9 unless open my $in, '<:encoding(utf8)', $file
19 0 9 unless close $in
33 6 10 if ($options{'scalar'}) { }
51 5 97 if (/^%%\s*([^:]+):\s*$/)
60 38 59 if ($mode eq 'multi-line')
61 5 33 if (/^%%\s*$/) { }
63 5 0 if ($row->{$mkey})
76 2 57 if (/^\s*#.*/) { }
41 16 elsif (/([^:]+):\s*(.*?)\s*$/) { }
15 1 elsif (/^\s*$/) { }
93 1 40 if ($row->{$key})
104 11 4 if (keys %$row > 0)
112 1 0 if ($options{'scalar'})
120 4 10 if (keys %$last_row == 0)
123 2 12 unless wantarray
134 1 5 if (ref $list ne 'ARRAY')
140 1 5 if (ref $i ne 'HASH')
145 1 10 if (ref $i->{$k})
156 2 8 if (length($v) + length($k) > $maxlen or $v =~ /\n/) { }
166 2 1 if ($file) { }
1 0 elsif (defined wantarray) { }
167 0 2 unless open my $out, '>:encoding(utf8)', $file
169 0 2 unless close $out