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 144887 2 1 defined $first_key and $key eq $first_key
243 144886 1 1 length $op_char and substr($key, 0, 1) eq $op_char
246 144886 0 2 $invalid and $key =~ /$invalid/
467 52 69 3 $opt->{'prefer_numeric'} and &looks_like_number($value)
621 1 8921 9068 $opt->{'wrap_dbrefs'} and $type == 3
8922 9057 11 $opt->{'wrap_dbrefs'} and $type == 3 and exists $value->{'$id'}
9057 0 11 $opt->{'wrap_dbrefs'} and $type == 3 and exists $value->{'$id'} and exists $value->{'$ref'}
687 8842 1 1 defined $dt_type and $dt_type ne 'BSON::Time'

or 3 conditions

line l !l&&r !l&&!r condition
197 103 0 29928 $doc_type eq 'BSON::Raw' or $doc_type eq 'MongoDB::BSON::_EncodedDoc'
217 38 29886 0 $iter //= _hashlike_iterator($doc)
229 2 144888 29714 $first_key_pending or ($key, $value) = &$iter()
276 8923 1 100330 $type eq 'ARRAY' or $type eq 'BSON::Array'
9843 3 90480 $type eq 'HASH' or $type eq 'BSON::Doc'
9846 102 90378 $type eq 'HASH' or $type eq 'BSON::Doc' or $type eq 'BSON::Raw'
105 0 90378 $type eq 'HASH' or $type eq 'BSON::Doc' or $type eq 'BSON::Raw' or $type eq 'MongoDB::BSON::_EncodedDoc'
102 3 90375 $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 90373 $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 90358 $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 90358 $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'
8881 0 81473 $type eq 'BSON::Regex' or $type eq 'MongoDB::BSON::Regexp'
26 8886 72561 $type eq 'BSON::OID' or $type eq 'BSON::ObjectId'
8788 1 46059 $type eq 'BSON::MinKey' or $type eq 'MongoDB::MinKey'
8714 1 37344 $type eq 'BSON::MaxKey' or $type eq 'MongoDB::MaxKey'
2 8954 28388 $type eq 'SCALAR' or $type eq 'BSON::Bytes'
8956 4 28384 $type eq 'SCALAR' or $type eq 'BSON::Bytes' or $type eq 'BSON::Binary'
8958 0 28384 $type eq 'SCALAR' or $type eq 'BSON::Bytes' or $type eq 'BSON::Binary' or $type eq 'MongoDB::BSON::Binary'
8985 0 19399 $type eq 'BSON::Code' or $type eq 'MongoDB::Code'
7 8969 10423 $type eq 'boolean' or $type =~ /$bools_re/
8811 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 17675 $value > $max_int64 or $value < $min_int64
4334 4477 8864 $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 8937 12 125784 $type == 2 or $type == 14
9172 8924 107688 $type == 3 or $type == 4
606 8 3 8938 length $bson < $len or substr($bson, $len - 1, 1) ne "\000"
671 4429 4547 2 $bool == 0 or $bool == 1
711 0 3 8 length $bson < $len or substr($bson, $len - 1, 1) ne "\000"
727 0 0 326 length $bson < $len or substr($bson, $len - 1, 1) ne "\000"
761 1 0 8665 length $codewscope < $strlen or substr($codewscope, -1, 1) ne "\000"
777 3 0 8660 length $codewscope < $scopelen or substr($codewscope, $scopelen - 1, 1) ne "\000"