Branch Coverage

blib/lib/MaxMind/DB/Writer/Serializer.pm
Criterion Covered Total %
branch 53 58 91.3


line true false branch
93 0 11911 unless defined $data
101 5166 6745 unless $self->_should_cache_value($type, $data)
111 1289 5456 if (defined $position) { }
165 131 11780 unless $self->_deduplicate_data
167 2796 8984 if ($NeverCache{$type})
173 241 8743 if ($type eq 'uint64' or $type eq 'uint128') { }
2205 6538 elsif (ref $data) { }
252 1299 13 if ($value < $pointer_thresholds[$n]{'cutoff'})
259 2 1297 if ($n == 3) { }
320 1 106 if &is_utf8($bytes)
351 232 3218 if (ref $value_type)
364 0 235 unless defined $value_type
379 1 3450 unless $type
417 49 49 $value ? :
445 270 2712 if ($bits >= 64) { }
477 3 4290 unless defined $value
480 273 4017 if ($bits >= 64) { }
481 231 42 if (builtin::blessed($value) and $value->isa('Math::UInt128')) { }
482 1 230 if $bits != 128 and $value / 2 ** $bits > 1
487 2 40 unless $value =~ /^[0-9]+$/
493 4 4013 unless $value =~ /^[0-9]+$/
499 2 4011 if $value > $Max{$bits}
521 1 11911 if ($size >= $ThresholdSize{'4'})
531 11094 817 if ($type < 8) { }
542 9844 2067 if ($size < $ThresholdSize{'1'}) { }
4 2063 elsif ($size <= $ThresholdSize{'2'}) { }
2060 3 elsif ($size <= $ThresholdSize{'3'}) { }
3 0 elsif ($size <= $ThresholdSize{'4'}) { }
591 0 0 unless open my $fh, "<:raw", $self->buffer