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 148844 2 1 defined $first_key and $key eq $first_key
243 148843 1 1 length $op_char and substr($key, 0, 1) eq $op_char
246 148843 0 2 $invalid and $key =~ /$invalid/
467 54 69 3 $opt->{'prefer_numeric'} and &looks_like_number($value)
621 1 9053 9390 $opt->{'wrap_dbrefs'} and $type == 3
9054 9378 12 $opt->{'wrap_dbrefs'} and $type == 3 and exists $value->{'$id'}
9378 0 12 $opt->{'wrap_dbrefs'} and $type == 3 and exists $value->{'$id'} and exists $value->{'$ref'}
687 9093 1 2 defined $dt_type and $dt_type ne 'BSON::Time'

or 3 conditions

line l !l&&r !l&&!r condition
197 103 0 30619 $doc_type eq 'BSON::Raw' or $doc_type eq 'MongoDB::BSON::_EncodedDoc'
217 39 30576 0 $iter //= _hashlike_iterator($doc)
229 2 148845 30405 $first_key_pending or ($key, $value) = &$iter()
276 9055 1 103120 $type eq 'ARRAY' or $type eq 'BSON::Array'
10164 3 92949 $type eq 'HASH' or $type eq 'BSON::Doc'
10167 102 92847 $type eq 'HASH' or $type eq 'BSON::Doc' or $type eq 'BSON::Raw'
105 0 92847 $type eq 'HASH' or $type eq 'BSON::Doc' or $type eq 'BSON::Raw' or $type eq 'MongoDB::BSON::_EncodedDoc'
102 3 92844 $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 92842 $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 16 92826 $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'
18 0 92826 $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'
9223 0 83599 $type eq 'BSON::Regex' or $type eq 'MongoDB::BSON::Regexp'
27 9115 74457 $type eq 'BSON::OID' or $type eq 'BSON::ObjectId'
9084 1 47193 $type eq 'BSON::MinKey' or $type eq 'MongoDB::MinKey'
9143 1 38049 $type eq 'BSON::MaxKey' or $type eq 'MongoDB::MaxKey'
2 9071 28976 $type eq 'SCALAR' or $type eq 'BSON::Bytes'
9073 4 28972 $type eq 'SCALAR' or $type eq 'BSON::Bytes' or $type eq 'BSON::Binary'
9075 0 28972 $type eq 'SCALAR' or $type eq 'BSON::Bytes' or $type eq 'BSON::Binary' or $type eq 'MongoDB::BSON::Binary'
9172 0 19800 $type eq 'BSON::Code' or $type eq 'MongoDB::Code'
7 9083 10710 $type eq 'boolean' or $type =~ /$bools_re/
9098 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 18255 $value > $max_int64 or $value < $min_int64
4608 4528 9119 $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 9226 12 129207 $type == 2 or $type == 14
9494 9056 110657 $type == 3 or $type == 4
606 8 3 9227 length $bson < $len or substr($bson, $len - 1, 1) ne "\000"
671 4579 4511 2 $bool == 0 or $bool == 1
711 0 3 8 length $bson < $len or substr($bson, $len - 1, 1) ne "\000"
727 0 0 285 length $bson < $len or substr($bson, $len - 1, 1) ne "\000"
761 1 0 8893 length $codewscope < $strlen or substr($codewscope, -1, 1) ne "\000"
777 3 0 8888 length $codewscope < $scopelen or substr($codewscope, $scopelen - 1, 1) ne "\000"