Branch Coverage

blib/lib/CBOR/PP/Encode.pm
Criterion Covered Total %
branch 39 68 57.3


line true false branch
121 2 477 if $_depth > 98
124 230 247 if (not ref $_) { }
227 20 elsif (ref $_ eq 'ARRAY') { }
14 6 elsif (ref $_ eq 'HASH') { }
5 1 elsif (ref($_)->isa('JSON::PP::Boolean')) { }
1 0 elsif (ref($_)->isa('CBOR::PP::Tagged')) { }
127 2 228 unless defined $_
130 0 3 utf8::is_utf8($_) ? :
3 225 unless length $_
133 158 67 if (not $_ or not tr[0-9][\000-/:-\377]c and 0 != rindex($_, '0', 0))
134 134 24 if $_ < 24
136 12 12 if $_ < 256
138 2 10 if $_ < 65536
140 4 6 if $_ <= 4294967295
158 6 61 if (utf8::is_utf8($_)) { }
164 6 0 if length $_ < 24
166 0 0 if length $_ < 256
168 0 0 if length $_ < 65536
170 0 0 if length $_ <= 4294967295
175 61 0 if length $_ < 24
177 0 0 if length $_ < 256
179 0 0 if length $_ < 65536
181 0 0 if length $_ <= 4294967295
189 224 3 if (@$_ < 24) { }
3 0 elsif (@$_ < 256) { }
0 0 elsif (@$_ < 65536) { }
0 0 elsif (@$_ <= 4294967295) { }
212 14 0 if ($numkeys < 24) { }
0 0 elsif ($numkeys < 256) { }
0 0 elsif ($numkeys < 65536) { }
0 0 elsif ($numkeys <= 4294967295) { }
228 2 12 if ($_[1] and $_[1]{'canonical'}) { }
231 0 4 unless length $a <=> length $b
239 3 2 $_ ? :