Condition Coverage

blib/lib/BSON/PP.pm
Criterion Covered Total %
condition 109 132 82.5


and 3 conditions

line !l l&&!r l&&r condition
230 137668 2 1 defined $first_key and $key eq $first_key
243 137667 1 1 length $op_char and substr($key, 0, 1) eq $op_char
246 137667 0 2 $invalid and $key =~ /$invalid/
467 52 69 3 $opt->{'prefer_numeric'} and &looks_like_number($value)
621 1 8422 8442 $opt->{'wrap_dbrefs'} and $type == 3
8423 8431 11 $opt->{'wrap_dbrefs'} and $type == 3 and exists $value->{'$id'}
8431 0 11 $opt->{'wrap_dbrefs'} and $type == 3 and exists $value->{'$id'} and exists $value->{'$ref'}
687 8435 1 1 defined $dt_type and $dt_type ne 'BSON::Time'

or 3 conditions

line l !l&&r !l&&!r condition
197 103 0 28405 $doc_type eq 'BSON::Raw' or $doc_type eq 'MongoDB::BSON::_EncodedDoc'
217 38 28363 0 $iter //= _hashlike_iterator($doc)
229 2 137669 28191 $first_key_pending or ($key, $value) = &$iter()
276 8424 1 95464 $type eq 'ARRAY' or $type eq 'BSON::Array'
9216 3 86241 $type eq 'HASH' or $type eq 'BSON::Doc'
9219 102 86139 $type eq 'HASH' or $type eq 'BSON::Doc' or $type eq 'BSON::Raw'
105 0 86139 $type eq 'HASH' or $type eq 'BSON::Doc' or $type eq 'BSON::Raw' or $type eq 'MongoDB::BSON::_EncodedDoc'
102 3 86136 $type eq 'HASH' or $type eq 'BSON::Doc' or $type eq 'BSON::Raw' or $type eq 'MongoDB::BSON::_EncodedDoc' or $type eq 'Tie::IxHash'
3 2 86134 $type eq 'HASH' or $type eq 'BSON::Doc' or $type eq 'BSON::Raw' or $type eq 'MongoDB::BSON::_EncodedDoc' or $type eq 'Tie::IxHash' or $type eq 'MongoDB::BSON::Raw'
5 15 86119 $type eq 'HASH' or $type eq 'BSON::Doc' or $type eq 'BSON::Raw' or $type eq 'MongoDB::BSON::_EncodedDoc' or $type eq 'Tie::IxHash' or $type eq 'MongoDB::BSON::Raw' or $type eq 'BSON::DBRef'
17 0 86119 $type eq 'HASH' or $type eq 'BSON::Doc' or $type eq 'BSON::Raw' or $type eq 'MongoDB::BSON::_EncodedDoc' or $type eq 'Tie::IxHash' or $type eq 'MongoDB::BSON::Raw' or $type eq 'BSON::DBRef' or $type eq 'MongoDB::DBRef'
8389 0 77726 $type eq 'BSON::Regex' or $type eq 'MongoDB::BSON::Regexp'
26 8527 69173 $type eq 'BSON::OID' or $type eq 'BSON::ObjectId'
8287 1 44075 $type eq 'BSON::MinKey' or $type eq 'MongoDB::MinKey'
8444 1 35630 $type eq 'BSON::MaxKey' or $type eq 'MongoDB::MaxKey'
2 8419 27209 $type eq 'SCALAR' or $type eq 'BSON::Bytes'
8421 4 27205 $type eq 'SCALAR' or $type eq 'BSON::Bytes' or $type eq 'BSON::Binary'
8423 0 27205 $type eq 'SCALAR' or $type eq 'BSON::Bytes' or $type eq 'BSON::Binary' or $type eq 'MongoDB::BSON::Binary'
8530 0 18675 $type eq 'BSON::Code' or $type eq 'MongoDB::Code'
7 8418 10250 $type eq 'boolean' or $type =~ /$bools_re/
8638 6 1606 $type eq 'BSON::String' or $type eq 'BSON::Symbol'
16 8 1580 $type eq 'BSON::Int64' or $type eq 'Math::BigInt'
24 0 1580 $type eq 'BSON::Int64' or $type eq 'Math::BigInt' or $type eq 'Math::Int64'
426 0 0 24 $value > $max_int64 or $value < $min_int64
473 0 0 16868 $value > $max_int64 or $value < $min_int64
4242 4125 8501 $value > $max_int32 or $value < $min_int32
486 0 0 2 $value > $max_int64 or $value < $min_int64
0 0 2 $value > $max_int32 or $value < $min_int32
598 8764 12 119264 $type == 2 or $type == 14
8546 8425 102293 $type == 3 or $type == 4
606 8 3 8765 length $bson < $len or substr($bson, $len - 1, 1) ne "\000"
671 4230 4195 2 $bool == 0 or $bool == 1
711 0 3 8 length $bson < $len or substr($bson, $len - 1, 1) ne "\000"
727 0 0 268 length $bson < $len or substr($bson, $len - 1, 1) ne "\000"
761 1 0 8268 length $codewscope < $strlen or substr($codewscope, -1, 1) ne "\000"
777 3 0 8263 length $codewscope < $scopelen or substr($codewscope, $scopelen - 1, 1) ne "\000"