blib/lib/BSON.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
condition | 39 | 85 | 45.8 |
line | l | !l | condition |
---|---|---|---|
691 | 28 | 0 | $data->{'$numberDouble'} eq '-0' and $] lt '5.014' and 1 |
869 | 0 | 0 | $hash->{'$numberDouble'} eq '-0' and $] lt '5.014' and 1 |
line | !l | l&&!r | l&&r | condition |
---|---|---|---|---|
53 | 0 | 0 | 1 | $class->can('_encode_bson') and $class->can('_decode_bson') |
310 | 2470 | 0 | 1 | $merged_opts->{'max_length'} and length $bson > $merged_opts->{'max_length'} |
349 | 2147 | 0 | 1 | $merged_opts->{'max_length'} and length $string > $merged_opts->{'max_length'} |
384 | 0 | 0 | 0 | @args == 1 and ref $args[0] eq 'HASH' |
473 | 1889 | 6 | 1766 | &blessed($data) and $data->can('TO_JSON') |
529 | 0 | 2 | 4 | &blessed($data) and $data->isa('JSON::PP::Boolean') |
533 | 0 | 0 | 2 | &blessed($data) and $data->isa('Math::BigInt') || $data->isa('Math::BigFloat') |
634 | 1951 | 0 | 0 | exists $data->{'$regex'} and not ref $data->{'$regex'} |
691 | 28 | 0 | 0 | $data->{'$numberDouble'} eq '-0' and $] lt '5.014' |
747 | 0 | 732 | 0 | defined $_[0] and $_[0] eq 'BSON' || &blessed($_[0]) && $_[0]->isa('BSON') |
752 | 631 | 0 | 101 | @_ == 1 and ref $_[0] eq 'HASH' |
764 | 0 | 688 | 0 | defined $_[0] and $_[0] eq 'BSON' || &blessed($_[0]) && $_[0]->isa('BSON') |
770 | 688 | 0 | 0 | @_ == 1 and ref $_[0] eq 'HASH' |
780 | 687 | 0 | 1 | exists $args->{'ixhash'} and not exists $args->{'ordered'} |
869 | 0 | 0 | 0 | $hash->{'$numberDouble'} eq '-0' and $] lt '5.014' |
913 | 2 | 0 | 0 | defined $z and length $z |
line | l | !l | condition |
---|---|---|---|
601 | 0 | 0 | $data->{'$type'} || 0 |
608 | 24 | 0 | $value->{'subType'} || 0 |
813 | 0 | 0 | $hash->{'$type'} || 0 |
line | l | !l&&r | !l&&!r | condition |
---|---|---|---|---|
47 | 0 | 0 | 70 | eval { do { _try_load($class = 'BSON::XS') } } or do { push @errs, $@; 0 } |
70 | 0 | 0 | eval { do { _try_load($class = 'BSON::PP') } } or do { push @errs, $@; 0 } | |
296 | 2481 | 1 | 1 | &blessed($document) || $type eq 'HASH' || $type eq 'ARRAY' |
1 | 1 | 2482 | $type eq 'Regexp' or not &blessed($document) || $type eq 'HASH' || $type eq 'ARRAY' | |
310 | 11 | 2 | 2469 | $@ or $merged_opts->{'max_length'} and length $bson > $merged_opts->{'max_length'} |
311 | 11 | 1 | 0 | $@ || "Document exceeds maximum size $merged_opts->{'max_length'}" |
533 | 0 | 2 | 0 | $data->isa('Math::BigInt') || $data->isa('Math::BigFloat') |
747 | 0 | 0 | 732 | $_[0] eq 'BSON' || &blessed($_[0]) && $_[0]->isa('BSON') |
764 | 0 | 0 | 688 | $_[0] eq 'BSON' || &blessed($_[0]) && $_[0]->isa('BSON') |