| line | true | false | branch | 
 
| 216 | 0 | 3435 | PUSHMARK (SP); | 
 
| 217 | 0 | 3435 | XPUSHs (self); | 
 
| 220 | 3083 | 3435 | for( ; num > 0; num-- ) { | 
 
| 221 | 0 | 3083 | XPUSHs (va_arg( args, SV* )); | 
 
|  | 3083 | 0 | XPUSHs (va_arg( args, SV* )); | 
 
| 229 | 0 | 3435 | if (count != 1) { | 
 
| 236 | 3435 | 0 | FREETMPS; | 
 
| 279 | 0 | 2906 | PUSHMARK (SP); | 
 
| 280 | 0 | 2906 | XPUSHs (self); | 
 
| 282 | 4416 | 0 | while ((key = va_arg (args, char *))) { | 
 
|  | 1510 | 2906 | while ((key = va_arg (args, char *))) { | 
 
| 283 | 0 | 1510 | mXPUSHp (key, strlen (key)); | 
 
| 284 | 0 | 1510 | XPUSHs (va_arg (args, SV *)); | 
 
|  | 1510 | 0 | XPUSHs (va_arg (args, SV *)); | 
 
| 291 | 0 | 2906 | if (count != 1) { | 
 
| 298 | 2906 | 0 | FREETMPS; | 
 
| 313 | 0 | 0 | PUSHMARK (SP); | 
 
| 316 | 0 | 0 | for( ; num > 0; num-- ) { | 
 
| 317 | 0 | 0 | XPUSHs (va_arg( args, SV* )); | 
 
|  | 0 | 0 | XPUSHs (va_arg( args, SV* )); | 
 
| 325 | 0 | 0 | if (count != 1) { | 
 
| 332 | 0 | 0 | FREETMPS; | 
 
| 353 | 0 | 40 | PUSHMARK (SP); | 
 
| 360 | 17 | 23 | if ( count == 0 ) { | 
 
| 367 | 0 | 23 | ok = SvOK(ret[0]) != 0; | 
 
|  | 0 | 0 | ok = SvOK(ret[0]) != 0; | 
 
|  | 0 | 0 | ok = SvOK(ret[0]) != 0; | 
 
| 371 | 23 | 17 | FREETMPS; | 
 
| 386 | 0 | 1 | PUSHMARK (SP); | 
 
| 389 | 1 | 1 | for( ; num > 0; num-- ) { | 
 
| 390 | 0 | 1 | XPUSHs (va_arg( args, SV* )); | 
 
|  | 1 | 0 | XPUSHs (va_arg( args, SV* )); | 
 
| 398 | 0 | 1 | if (count != 1) { | 
 
| 405 | 1 | 0 | FREETMPS; | 
 
| 418 | 0 | 1956 | if (!SvROK (sv)) { | 
 
| 422 | 1936 | 20 | if ( ! sv_isobject(sv) ) { | 
 
| 423 | 1936 | 0 | switch ( SvTYPE(SvRV(sv)) ) { | 
 
| 437 | 20 | 0 | class = HvNAME(SvSTASH(obj)); | 
 
|  | 20 | 0 | class = HvNAME(SvSTASH(obj)); | 
 
|  | 0 | 20 | class = HvNAME(SvSTASH(obj)); | 
 
|  | 0 | 0 | class = HvNAME(SvSTASH(obj)); | 
 
|  | 20 | 0 | class = HvNAME(SvSTASH(obj)); | 
 
|  | 0 | 20 | class = HvNAME(SvSTASH(obj)); | 
 
| 439 | 3 | 17 | if ( strEQ(class, "Tie::IxHash") ) { | 
 
| 442 | 14 | 3 | else if ( strEQ(class, "BSON::Doc") ) { | 
 
| 445 | 1 | 2 | else if ( strEQ(class, "BSON::Raw") ) { | 
 
| 452 | 1 | 0 | bson_str = SvPV(encoded, str_len); | 
 
| 457 | 0 | 2 | else if ( strEQ(class, "MongoDB::BSON::_EncodedDoc") ) { | 
 
| 464 | 0 | 0 | encoded = _hv_fetchs_sv((HV *)obj, "bson"); | 
 
|  | 0 | 0 | encoded = _hv_fetchs_sv((HV *)obj, "bson"); | 
 
| 465 | 0 | 0 | bson_str = SvPV(encoded, str_len); | 
 
| 470 | 1 | 1 | else if ( strEQ(class, "MongoDB::BSON::Raw") ) { | 
 
| 479 | 0 | 1 | if (!SvPOK(str_sv)) { | 
 
| 483 | 1 | 0 | str = SvPV(str_sv, str_len); | 
 
| 489 | 0 | 1 | else if (SvTYPE(obj) == SVt_PVHV) { | 
 
| 505 | 2 | 2867 | if ( depth > MAX_DEPTH ) { | 
 
| 509 | 3 | 2864 | if (!(stack = check_circular_ref(hv, stack))) { | 
 
| 513 | 1936 | 928 | if ( ! subdoc ) { | 
 
| 518 | 2906 | 2656 | while ((he = hv_iternext (hv))) { | 
 
| 521 | 1779 | 1127 | const char *key = HePV (he, len); | 
 
|  | 1779 | 0 | const char *key = HePV (he, len); | 
 
| 522 | 1779 | 1127 | uint32_t utf8 = HeUTF8(he); | 
 
| 526 | 0 | 2905 | if (first_key && strcmp(key, first_key) == 0) { | 
 
|  | 0 | 0 | if (first_key && strcmp(key, first_key) == 0) { | 
 
| 534 | 734 | 2171 | if ((hval = hv_fetch(hv, key, utf8 ? -len : len, 0)) == 0) { | 
 
|  | 0 | 2905 | if ((hval = hv_fetch(hv, key, utf8 ? -len : len, 0)) == 0) { | 
 
| 537 | 2171 | 734 | if (!utf8) { | 
 
| 541 | 0 | 2905 | if ( ! is_utf8_string((const U8*)key,len)) { | 
 
| 546 | 1964 | 734 | if (!utf8) { | 
 
| 552 | 1927 | 729 | if ( ! subdoc ) { | 
 
| 566 | 0 | 25 | if ( depth > MAX_DEPTH ) { | 
 
| 577 | 1 | 24 | if (!(stack = check_circular_ref(array, stack))) { | 
 
| 589 | 3 | 21 | if ( ! subdoc ) { | 
 
| 593 | 53 | 23 | for (i=0; i<=av_len(keys); i++) { | 
 
| 598 | 53 | 0 | if (!(k = av_fetch(keys, i, 0)) || | 
 
|  | 0 | 53 | if (!(k = av_fetch(keys, i, 0)) || | 
 
| 603 | 2 | 51 | str = SvPVutf8(*k, len); | 
 
| 606 | 0 | 53 | if (first_key && strcmp(str, first_key) == 0) { | 
 
|  | 0 | 0 | if (first_key && strcmp(str, first_key) == 0) { | 
 
| 614 | 2 | 21 | if ( ! subdoc ) { | 
 
| 631 | 0 | 17 | if ( depth > MAX_DEPTH ) { | 
 
| 636 | 0 | 17 | if (!(stack = check_circular_ref(SvRV(sv), stack))) { | 
 
| 637 | 0 | 0 | croak("circular ref: %s", SvPV_nolen(sv)); | 
 
| 640 | 14 | 3 | if ( ! subdoc ) { | 
 
| 645 | 17 | 0 | if ( !SvROK(iter) || SvTYPE(SvRV(iter)) != SVt_PVCV ) { | 
 
|  | 0 | 17 | if ( !SvROK(iter) || SvTYPE(SvRV(iter)) != SVt_PVCV ) { | 
 
| 646 | 0 | 0 | croak("invalid iterator from %s", SvPV_nolen(sv)); | 
 
| 649 | 23 | 17 | while ( call_key_value_iter( iter, kv ) ) { | 
 
| 655 | 1 | 22 | str = SvPVutf8(kv[0], len); | 
 
| 658 | 3 | 20 | if (first_key && strcmp(str, first_key) == 0) { | 
 
|  | 1 | 2 | if (first_key && strcmp(str, first_key) == 0) { | 
 
| 666 | 14 | 3 | if ( ! subdoc ) { | 
 
| 678 | 0 | 17 | if ( depth > MAX_DEPTH ) { | 
 
| 682 | 0 | 17 | if (!(stack = check_circular_ref(av, stack))) { | 
 
| 686 | 128 | 16 | for (i = 0; i <= av_len (av); i++) { | 
 
| 689 | 0 | 128 | if (!(sv = av_fetch (av, i, 0))) | 
 
| 690 | 0 | 0 | sv_to_bson_elem (bson, SvPV_nolen(key), newSV(0), opts, stack, depth); | 
 
| 692 | 0 | 128 | sv_to_bson_elem (bson, SvPV_nolen(key), *sv, opts, stack, depth); | 
 
| 708 | 2 | 3110 | if ( | 
 
| 709 | 2 | 3110 | (tempsv = _hv_fetchs_sv(opts, "op_char")) | 
 
|  | 2 | 0 | (tempsv = _hv_fetchs_sv(opts, "op_char")) | 
 
| 710 | 0 | 2 | && SvOK(tempsv) | 
 
|  | 0 | 0 | && SvOK(tempsv) | 
 
|  | 0 | 0 | && SvOK(tempsv) | 
 
| 711 | 2 | 0 | && SvPV_nolen(tempsv)[0] == str[0] | 
 
|  | 1 | 1 | && SvPV_nolen(tempsv)[0] == str[0] | 
 
| 720 | 3112 | 0 | if ( | 
 
| 721 | 3112 | 0 | (tempsv = _hv_fetchs_sv(opts, "invalid_chars")) | 
 
|  | 3112 | 0 | (tempsv = _hv_fetchs_sv(opts, "invalid_chars")) | 
 
| 722 | 0 | 3112 | && SvOK(tempsv) | 
 
|  | 0 | 0 | && SvOK(tempsv) | 
 
|  | 0 | 0 | && SvOK(tempsv) | 
 
| 723 | 2 | 3110 | && (len = sv_len(tempsv)) | 
 
| 726 | 2 | 0 | const char *invalid = SvPV_nolen(tempsv); | 
 
| 728 | 2 | 0 | for (i=0; i | 
 
| 729 | 2 | 0 | if (strchr(str, invalid[i])) { | 
 
| 743 | 1788 | 1322 | if (!SvOK(sv)) { | 
 
|  | 1788 | 0 | if (!SvOK(sv)) { | 
 
|  | 1788 | 0 | if (!SvOK(sv)) { | 
 
| 744 | 1779 | 9 | if (SvGMAGICAL(sv)) { | 
 
| 749 | 16 | 3094 | if (!SvOK(sv)) { | 
 
|  | 16 | 0 | if (!SvOK(sv)) { | 
 
|  | 16 | 0 | if (!SvOK(sv)) { | 
 
| 753 | 2837 | 257 | else if (SvROK (sv)) { | 
 
| 754 | 1899 | 938 | if (sv_isobject (sv)) { | 
 
| 757 | 1865 | 34 | if ( parent != NULL ) { | 
 
| 758 | 1865 | 0 | obj_type = (const char *) SvPV_nolen(parent); | 
 
| 762 | 27 | 1872 | if (strEQ(obj_type, "BSON::OID")) { | 
 
| 764 | 27 | 0 | char *bytes = SvPV_nolen(attr); | 
 
| 771 | 0 | 1872 | else if (strEQ(obj_type, "MongoDB::OID")) { | 
 
| 773 | 0 | 0 | char *str = SvPV_nolen (attr); | 
 
| 781 | 3 | 1869 | else if (strEQ(obj_type, "Tie::IxHash")) { | 
 
| 788 | 3 | 1866 | else if (strEQ(obj_type, "BSON::Doc")) { | 
 
| 795 | 1 | 1865 | else if (strEQ(obj_type, "BSON::Array")) { | 
 
| 802 | 102 | 1763 | else if (strEQ(obj_type, "BSON::Raw")) { | 
 
| 809 | 102 | 0 | bson_str = SvPV(encoded, str_len); | 
 
| 815 | 2 | 1761 | else if (strEQ(obj_type, "MongoDB::BSON::Raw")) { | 
 
| 824 | 0 | 2 | if (!SvPOK(str_sv)) { | 
 
| 828 | 2 | 0 | str = SvPV(str_sv, str_len); | 
 
| 834 | 18 | 1743 | else if (strEQ(obj_type, "BSON::Time")) { | 
 
| 836 | 0 | 18 | if ( sv_isa(ms, "Math::BigInt") ) { | 
 
| 841 | 18 | 0 | bson_append_date_time(bson, key, -1, (int64_t)SvIV(ms)); | 
 
| 845 | 0 | 1743 | else if (strEQ(obj_type, "Time::Moment")) { | 
 
| 848 | 0 | 0 | bson_append_date_time(bson, key, -1, (int64_t)SvIV(sec)*1000+SvIV(ms)); | 
 
|  | 0 | 0 | bson_append_date_time(bson, key, -1, (int64_t)SvIV(sec)*1000+SvIV(ms)); | 
 
| 851 | 0 | 1743 | else if (strEQ(obj_type, "DateTime")) { | 
 
| 859 | 0 | 0 | str = SvPV(tz_name, len); | 
 
| 860 | 0 | 0 | if (len == 8 && strncmp("floating", str, 8) == 0) { | 
 
|  | 0 | 0 | if (len == 8 && strncmp("floating", str, 8) == 0) { | 
 
| 867 | 0 | 0 | bson_append_date_time(bson, key, -1, (int64_t)SvIV(sec)*1000+SvIV(ms)); | 
 
|  | 0 | 0 | bson_append_date_time(bson, key, -1, (int64_t)SvIV(sec)*1000+SvIV(ms)); | 
 
| 870 | 0 | 1743 | else if (strEQ(obj_type, "DateTime::Tiny")) { | 
 
| 875 | 0 | 0 | t.tm_year   = SvIV( sv_2mortal(call_perl_reader( sv, "year"    )) ) - 1900; | 
 
| 876 | 0 | 0 | t.tm_mon    = SvIV( sv_2mortal(call_perl_reader( sv, "month"   )) ) -    1; | 
 
| 877 | 0 | 0 | t.tm_mday   = SvIV( sv_2mortal(call_perl_reader( sv, "day"     )) )       ; | 
 
| 878 | 0 | 0 | t.tm_hour   = SvIV( sv_2mortal(call_perl_reader( sv, "hour"    )) )       ; | 
 
| 879 | 0 | 0 | t.tm_min    = SvIV( sv_2mortal(call_perl_reader( sv, "minute"  )) )       ; | 
 
| 880 | 0 | 0 | t.tm_sec    = SvIV( sv_2mortal(call_perl_reader( sv, "second"  )) )       ; | 
 
| 889 | 0 | 1743 | else if (strEQ(obj_type, "Mango::BSON::Time")) { | 
 
| 890 | 0 | 0 | SV *ms = _hv_fetchs_sv((HV *)SvRV(sv), "time"); | 
 
|  | 0 | 0 | SV *ms = _hv_fetchs_sv((HV *)SvRV(sv), "time"); | 
 
| 891 | 0 | 0 | bson_append_date_time(bson, key, -1, (int64_t)SvIV(ms)); | 
 
| 894 | 1724 | 19 | else if (strEQ(obj_type, "BSON::DBRef") || strEQ(obj_type, "MongoDB::DBRef")) { | 
 
|  | 0 | 1724 | else if (strEQ(obj_type, "BSON::DBRef") || strEQ(obj_type, "MongoDB::DBRef")) { | 
 
| 909 | 1717 | 7 | else if ( | 
 
| 910 | 1716 | 1 | strEQ(obj_type, "boolean") || | 
 
| 911 | 1715 | 1 | strEQ(obj_type, "BSON::Bool") || | 
 
| 912 | 1710 | 5 | strEQ(obj_type, "JSON::XS::Boolean") || | 
 
| 913 | 1709 | 1 | strEQ(obj_type, "JSON::PP::Boolean") || | 
 
| 914 | 1708 | 1 | strEQ(obj_type, "JSON::Tiny::_Bool") || | 
 
| 915 | 1707 | 1 | strEQ(obj_type, "Mojo::JSON::_Bool") || | 
 
| 916 | 1 | 1706 | strEQ(obj_type, "Cpanel::JSON::XS::Boolean") || | 
 
| 919 | 18 | 0 | bson_append_bool(bson, key, -1, SvIV(SvRV(sv))); | 
 
| 921 | 1684 | 22 | else if (strEQ(obj_type, "BSON::Code") || strEQ(obj_type, "MongoDB::Code")) { | 
 
|  | 0 | 1684 | else if (strEQ(obj_type, "BSON::Code") || strEQ(obj_type, "MongoDB::Code")) { | 
 
| 927 | 11 | 11 | code_str = SvPVutf8(code, code_len); | 
 
| 929 | 0 | 22 | if ( ! is_utf8_string((const U8*)code_str,code_len)) { | 
 
| 930 | 0 | 0 | croak( "Invalid UTF-8 detected while encoding BSON from %s", SvPV_nolen(sv) ); | 
 
| 935 | 9 | 13 | if (SvOK(scope)) { | 
 
|  | 9 | 0 | if (SvOK(scope)) { | 
 
|  | 0 | 9 | if (SvOK(scope)) { | 
 
| 945 | 10 | 1674 | else if (strEQ(obj_type, "BSON::Timestamp")) { | 
 
| 951 | 10 | 0 | bson_append_timestamp(bson, key, -1, SvIV(sec), SvIV(inc)); | 
 
|  | 10 | 0 | bson_append_timestamp(bson, key, -1, SvIV(sec), SvIV(inc)); | 
 
| 953 | 0 | 1674 | else if (strEQ(obj_type, "MongoDB::Timestamp")) { | 
 
| 959 | 0 | 0 | bson_append_timestamp(bson, key, -1, SvIV(sec), SvIV(inc)); | 
 
|  | 0 | 0 | bson_append_timestamp(bson, key, -1, SvIV(sec), SvIV(inc)); | 
 
| 961 | 1669 | 5 | else if (strEQ(obj_type, "BSON::MinKey") || strEQ(obj_type, "MongoDB::MinKey")) { | 
 
|  | 1 | 1668 | else if (strEQ(obj_type, "BSON::MinKey") || strEQ(obj_type, "MongoDB::MinKey")) { | 
 
| 964 | 1663 | 5 | else if (strEQ(obj_type, "BSON::MaxKey") || strEQ(obj_type, "MongoDB::MaxKey")) { | 
 
|  | 1 | 1662 | else if (strEQ(obj_type, "BSON::MaxKey") || strEQ(obj_type, "MongoDB::MaxKey")) { | 
 
| 967 | 0 | 1662 | else if (strEQ(obj_type, "MongoDB::BSON::_EncodedDoc")) { | 
 
| 974 | 0 | 0 | encoded = _hv_fetchs_sv((HV *)SvRV(sv), "bson"); | 
 
|  | 0 | 0 | encoded = _hv_fetchs_sv((HV *)SvRV(sv), "bson"); | 
 
| 975 | 0 | 0 | bson_str = SvPV(encoded, str_len); | 
 
| 980 | 8 | 1654 | else if (strEQ(obj_type, "BSON::String")) { | 
 
| 988 | 2 | 1652 | else if (strEQ(obj_type, "MongoDB::BSON::String")) { | 
 
| 996 | 0 | 2 | if (!SvPOK(str_sv)) { | 
 
| 1002 | 1628 | 24 | else if (strEQ(obj_type, "BSON::Bytes") || strEQ(obj_type, "MongoDB::BSON::Binary")) { | 
 
|  | 0 | 1628 | else if (strEQ(obj_type, "BSON::Bytes") || strEQ(obj_type, "MongoDB::BSON::Binary")) { | 
 
| 1008 | 24 | 0 | append_binary(bson, key, SvIV(subtype), data); | 
 
| 1010 | 1 | 1627 | else if (strEQ(obj_type, "BSON::Binary")) { | 
 
| 1016 | 0 | 1 | int_subtype = SvOK(subtype) ? SvIV(subtype) : 0; | 
 
|  | 0 | 0 | int_subtype = SvOK(subtype) ? SvIV(subtype) : 0; | 
 
|  | 0 | 0 | int_subtype = SvOK(subtype) ? SvIV(subtype) : 0; | 
 
|  | 1 | 0 | int_subtype = SvOK(subtype) ? SvIV(subtype) : 0; | 
 
| 1021 | 0 | 1 | if ( SvOK(data) && ( SvTYPE(SvRV(data)) == SVt_PVAV) ) { | 
 
|  | 0 | 0 | if ( SvOK(data) && ( SvTYPE(SvRV(data)) == SVt_PVAV) ) { | 
 
|  | 0 | 0 | if ( SvOK(data) && ( SvTYPE(SvRV(data)) == SVt_PVAV) ) { | 
 
|  | 1 | 0 | if ( SvOK(data) && ( SvTYPE(SvRV(data)) == SVt_PVAV) ) { | 
 
| 1030 | 1 | 1626 | else if (strEQ(obj_type, "Regexp")) { | 
 
| 1039 | 1602 | 24 | else if (strEQ(obj_type, "BSON::Regex") || strEQ(obj_type, "MongoDB::BSON::Regexp") ) { | 
 
|  | 0 | 1602 | else if (strEQ(obj_type, "BSON::Regex") || strEQ(obj_type, "MongoDB::BSON::Regexp") ) { | 
 
| 1045 | 24 | 0 | append_decomposed_regex( bson, key, SvPV_nolen( pattern ), SvPV_nolen( flags ) ); | 
 
|  | 24 | 0 | append_decomposed_regex( bson, key, SvPV_nolen( pattern ), SvPV_nolen( flags ) ); | 
 
| 1048 | 6 | 1596 | else if (strEQ(obj_type, "Math::BigInt")) { | 
 
| 1051 | 16 | 1580 | else if (strEQ(obj_type, "BSON::Int64") ) { | 
 
| 1054 | 2 | 14 | if ( SvROK(v) ) { | 
 
| 1059 | 0 | 14 | bson_append_int64(bson, key, -1, (int64_t)SvIV(sv)); | 
 
| 1061 | 0 | 1580 | else if (strEQ(obj_type, "Math::Int64")) { | 
 
| 1064 | 0 | 0 | Copy(SvPVbyte_nolen(v_sv), &v_int, 1, uint64_t); | 
 
| 1067 | 35 | 1545 | else if (strEQ(obj_type, "BSON::Int32") ) { | 
 
| 1068 | 0 | 35 | bson_append_int32(bson, key, -1, (int32_t)SvIV(sv)); | 
 
| 1070 | 32 | 1513 | else if (strEQ(obj_type, "BSON::Double") ) { | 
 
| 1071 | 0 | 32 | bson_append_double(bson, key, -1, (double)SvNV(sv)); | 
 
| 1073 | 1512 | 1 | else if (strEQ(obj_type, "BSON::Decimal128") ) { | 
 
| 1079 | 1512 | 0 | bid_bytes = SvPV_nolen(dec_sv); | 
 
| 1090 | 1 | 0 | croak ("For key '%s', can't encode value of type '%s'", key, HvNAME(SvSTASH(SvRV(sv)))); | 
 
|  | 1 | 0 | croak ("For key '%s', can't encode value of type '%s'", key, HvNAME(SvSTASH(SvRV(sv)))); | 
 
|  | 0 | 1 | croak ("For key '%s', can't encode value of type '%s'", key, HvNAME(SvSTASH(SvRV(sv)))); | 
 
|  | 0 | 0 | croak ("For key '%s', can't encode value of type '%s'", key, HvNAME(SvSTASH(SvRV(sv)))); | 
 
|  | 1 | 0 | croak ("For key '%s', can't encode value of type '%s'", key, HvNAME(SvSTASH(SvRV(sv)))); | 
 
|  | 0 | 1 | croak ("For key '%s', can't encode value of type '%s'", key, HvNAME(SvSTASH(SvRV(sv)))); | 
 
| 1113 | 2 | 0 | if ( SvPOK(deref) ) { | 
 
| 1118 | 0 | 0 | croak ("For key '%s', can't encode value '%s'", key, SvPV_nolen(sv)); | 
 
| 1128 | 92 | 165 | tempsv = _hv_fetchs_sv(opts, "prefer_numeric"); | 
 
|  | 92 | 0 | tempsv = _hv_fetchs_sv(opts, "prefer_numeric"); | 
 
| 1129 | 92 | 165 | prefer_numeric = SvTRUE(tempsv); | 
 
|  | 0 | 92 | prefer_numeric = SvTRUE(tempsv); | 
 
|  | 0 | 0 | prefer_numeric = SvTRUE(tempsv); | 
 
|  | 0 | 92 | prefer_numeric = SvTRUE(tempsv); | 
 
|  | 0 | 0 | prefer_numeric = SvTRUE(tempsv); | 
 
|  | 0 | 0 | prefer_numeric = SvTRUE(tempsv); | 
 
|  | 0 | 92 | prefer_numeric = SvTRUE(tempsv); | 
 
|  | 0 | 0 | prefer_numeric = SvTRUE(tempsv); | 
 
|  | 0 | 0 | prefer_numeric = SvTRUE(tempsv); | 
 
|  | 0 | 0 | prefer_numeric = SvTRUE(tempsv); | 
 
|  | 0 | 0 | prefer_numeric = SvTRUE(tempsv); | 
 
|  | 0 | 0 | prefer_numeric = SvTRUE(tempsv); | 
 
|  | 92 | 0 | prefer_numeric = SvTRUE(tempsv); | 
 
|  | 92 | 0 | prefer_numeric = SvTRUE(tempsv); | 
 
|  | 7 | 85 | prefer_numeric = SvTRUE(tempsv); | 
 
|  | 0 | 7 | prefer_numeric = SvTRUE(tempsv); | 
 
|  | 0 | 0 | prefer_numeric = SvTRUE(tempsv); | 
 
|  | 85 | 7 | prefer_numeric = SvTRUE(tempsv); | 
 
|  | 0 | 0 | prefer_numeric = SvTRUE(tempsv); | 
 
| 1143 | 13 | 244 | if ( SvNOK(sv) ) { | 
 
| 1144 | 13 | 0 | bson_append_double(bson, key, -1, (double)SvNV(sv)); | 
 
| 1145 | 130 | 114 | } else if ( SvIOK(sv) ) { | 
 
| 1147 | 72 | 42 | } else if ( prefer_numeric && is_number )  { | 
 
|  | 3 | 69 | } else if ( prefer_numeric && is_number )  { | 
 
| 1150 | 1 | 2 | if (is_number & IS_NUMBER_NOT_INT) { /* double */ | 
 
| 1151 | 0 | 1 | bson_append_double(bson, key, -1, (double)SvNV(tempsv)); | 
 
| 1168 | 2 | 1951 | if ( (tempsv = _hv_fetchs_sv(opts, "first_key")) && SvOK (tempsv) ) { | 
 
|  | 2 | 0 | if ( (tempsv = _hv_fetchs_sv(opts, "first_key")) && SvOK (tempsv) ) { | 
 
|  | 2 | 1951 | if ( (tempsv = _hv_fetchs_sv(opts, "first_key")) && SvOK (tempsv) ) { | 
 
|  | 0 | 2 | if ( (tempsv = _hv_fetchs_sv(opts, "first_key")) && SvOK (tempsv) ) { | 
 
|  | 0 | 0 | if ( (tempsv = _hv_fetchs_sv(opts, "first_key")) && SvOK (tempsv) ) { | 
 
|  | 0 | 0 | if ( (tempsv = _hv_fetchs_sv(opts, "first_key")) && SvOK (tempsv) ) { | 
 
| 1170 | 0 | 2 | first_key = SvPVutf8(tempsv, len); | 
 
| 1172 | 2 | 0 | if ( (tempsv = _hv_fetchs_sv(opts, "first_value")) ) { | 
 
|  | 2 | 0 | if ( (tempsv = _hv_fetchs_sv(opts, "first_value")) ) { | 
 
|  | 2 | 0 | if ( (tempsv = _hv_fetchs_sv(opts, "first_value")) ) { | 
 
| 1205 | 3 | 1 | for ( i=0; flags[i]; i++ ) { | 
 
| 1206 | 3 | 3 | for ( j=i+1; flags[j] ; j++ ) { | 
 
| 1207 | 1 | 2 | if ( flags[i] > flags[j] ) { | 
 
| 1227 | 27 | 0 | uint8_t * bytes = (uint8_t *) SvPVbyte(sv, len); | 
 
| 1235 | 130 | 2 | IV i = SvIV(sv); | 
 
| 1236 | 132 | 0 | if ( i >= INT32_MIN && i <= INT32_MAX) { | 
 
|  | 132 | 0 | if ( i >= INT32_MIN && i <= INT32_MAX) { | 
 
| 1251 | 52 | 69 | const char *str = SvPVutf8(sv, len); | 
 
| 1253 | 0 | 121 | if ( ! is_utf8_string((const U8*)str,len)) { | 
 
| 1263 | 1 | 2983 | if(strlen(str)  < len) { | 
 
| 1265 | 1 | 0 | croak("Key '%s' contains null character", SvPV_nolen(clean)); | 
 
| 1302 | 0 | 1 | PUSHMARK (SP); | 
 
| 1303 | 0 | 1 | XPUSHs (sv); | 
 
| 1309 | 0 | 1 | if ( ret_count != 2 ) { | 
 
| 1317 | 0 | 1 | flags_tmp = SvPVutf8_nolen(flags_sv); | 
 
| 1318 | 4 | 0 | for ( i = 0; i < sizeof( flags_tmp ); i++ ) { | 
 
| 1319 | 1 | 3 | if ( flags_tmp[i] == 0 ) break; | 
 
| 1322 | 2 | 1 | if ( flags_tmp[i] == 'i' || | 
 
|  | 1 | 1 | if ( flags_tmp[i] == 'i' || | 
 
| 1323 | 0 | 1 | flags_tmp[i] == 'm' || | 
 
| 1324 | 0 | 0 | flags_tmp[i] == 'x' || | 
 
| 1325 | 0 | 0 | flags_tmp[i] == 'l' || | 
 
| 1326 | 0 | 0 | flags_tmp[i] == 'u' || | 
 
| 1336 | 1 | 0 | FREETMPS; | 
 
| 1349 | 4 | 2 | str = SvPV_nolen(tempsv); | 
 
| 1354 | 6 | 0 | if ( end && (*end != '\0') ) { | 
 
|  | 0 | 6 | if ( end && (*end != '\0') ) { | 
 
| 1355 | 0 | 0 | if ( errno == ERANGE && ( big == LLONG_MAX || big == LLONG_MIN ) ) { | 
 
|  | 0 | 0 | if ( errno == ERANGE && ( big == LLONG_MAX || big == LLONG_MIN ) ) { | 
 
|  | 0 | 0 | if ( errno == ERANGE && ( big == LLONG_MAX || big == LLONG_MIN ) ) { | 
 
| 1387 | 44634 | 2922 | while (stack) { | 
 
| 1388 | 4 | 44630 | if (ptr == stack->ptr) { | 
 
| 1414 | 0 | 1899 | if (! SvOBJECT(sv)) { | 
 
| 1420 | 0 | 1899 | if (av_len(mro) == -1) { | 
 
| 1424 | 3766 | 34 | for ( i=av_len(mro); i >= 0; i-- ) { | 
 
| 1426 | 3766 | 0 | if (handle != NULL) { | 
 
| 1427 | 3766 | 0 | char* klass = SvPV_nolen(*handle); | 
 
| 1428 | 1865 | 1901 | if (strnEQ(klass, "BSON::", 6)) { | 
 
| 1449 | 1 | 1813 | if ( depth > MAX_DEPTH ) { | 
 
| 1454 | 1472 | 341 | if ( (ordered = _hv_fetchs_sv(opts, "ordered")) && SvTRUE(ordered) ) { | 
 
|  | 1472 | 0 | if ( (ordered = _hv_fetchs_sv(opts, "ordered")) && SvTRUE(ordered) ) { | 
 
|  | 1472 | 341 | if ( (ordered = _hv_fetchs_sv(opts, "ordered")) && SvTRUE(ordered) ) { | 
 
|  | 1472 | 0 | if ( (ordered = _hv_fetchs_sv(opts, "ordered")) && SvTRUE(ordered) ) { | 
 
|  | 0 | 1472 | if ( (ordered = _hv_fetchs_sv(opts, "ordered")) && SvTRUE(ordered) ) { | 
 
|  | 0 | 1472 | if ( (ordered = _hv_fetchs_sv(opts, "ordered")) && SvTRUE(ordered) ) { | 
 
|  | 0 | 0 | if ( (ordered = _hv_fetchs_sv(opts, "ordered")) && SvTRUE(ordered) ) { | 
 
|  | 0 | 0 | if ( (ordered = _hv_fetchs_sv(opts, "ordered")) && SvTRUE(ordered) ) { | 
 
|  | 0 | 1472 | if ( (ordered = _hv_fetchs_sv(opts, "ordered")) && SvTRUE(ordered) ) { | 
 
|  | 0 | 0 | if ( (ordered = _hv_fetchs_sv(opts, "ordered")) && SvTRUE(ordered) ) { | 
 
|  | 0 | 0 | if ( (ordered = _hv_fetchs_sv(opts, "ordered")) && SvTRUE(ordered) ) { | 
 
|  | 0 | 0 | if ( (ordered = _hv_fetchs_sv(opts, "ordered")) && SvTRUE(ordered) ) { | 
 
|  | 0 | 0 | if ( (ordered = _hv_fetchs_sv(opts, "ordered")) && SvTRUE(ordered) ) { | 
 
|  | 1472 | 0 | if ( (ordered = _hv_fetchs_sv(opts, "ordered")) && SvTRUE(ordered) ) { | 
 
|  | 1472 | 0 | if ( (ordered = _hv_fetchs_sv(opts, "ordered")) && SvTRUE(ordered) ) { | 
 
|  | 0 | 1472 | if ( (ordered = _hv_fetchs_sv(opts, "ordered")) && SvTRUE(ordered) ) { | 
 
|  | 0 | 0 | if ( (ordered = _hv_fetchs_sv(opts, "ordered")) && SvTRUE(ordered) ) { | 
 
|  | 0 | 0 | if ( (ordered = _hv_fetchs_sv(opts, "ordered")) && SvTRUE(ordered) ) { | 
 
|  | 1472 | 0 | if ( (ordered = _hv_fetchs_sv(opts, "ordered")) && SvTRUE(ordered) ) { | 
 
| 1461 | 347 | 233 | while (bson_iter_next(iter)) { | 
 
| 1467 | 0 | 347 | if ( ! is_utf8_string((const U8*)name,strlen(name))) { | 
 
| 1474 | 341 | 6 | if ( key_num == 1 && strcmp( name, "$ref" ) ) is_dbref = 0; | 
 
|  | 339 | 2 | if ( key_num == 1 && strcmp( name, "$ref" ) ) is_dbref = 0; | 
 
| 1475 | 6 | 341 | if ( key_num == 2 && is_dbref == 1 && strcmp( name, "$id" ) ) is_dbref = 0; | 
 
|  | 2 | 4 | if ( key_num == 2 && is_dbref == 1 && strcmp( name, "$id" ) ) is_dbref = 0; | 
 
|  | 0 | 2 | if ( key_num == 2 && is_dbref == 1 && strcmp( name, "$id" ) ) is_dbref = 0; | 
 
| 1479 | 0 | 239 | if (!hv_store (hv, name, 0-strlen(name), value, 0)) { | 
 
| 1487 | 122 | 111 | if ( ! top && key_num >= 2 && is_dbref == 1 | 
 
|  | 2 | 120 | if ( ! top && key_num >= 2 && is_dbref == 1 | 
 
|  | 2 | 0 | if ( ! top && key_num >= 2 && is_dbref == 1 | 
 
| 1488 | 2 | 0 | && (wrap = _hv_fetchs_sv(opts, "wrap_dbrefs")) && SvTRUE(wrap) | 
 
|  | 2 | 0 | && (wrap = _hv_fetchs_sv(opts, "wrap_dbrefs")) && SvTRUE(wrap) | 
 
|  | 2 | 0 | && (wrap = _hv_fetchs_sv(opts, "wrap_dbrefs")) && SvTRUE(wrap) | 
 
|  | 2 | 0 | && (wrap = _hv_fetchs_sv(opts, "wrap_dbrefs")) && SvTRUE(wrap) | 
 
|  | 0 | 2 | && (wrap = _hv_fetchs_sv(opts, "wrap_dbrefs")) && SvTRUE(wrap) | 
 
|  | 0 | 2 | && (wrap = _hv_fetchs_sv(opts, "wrap_dbrefs")) && SvTRUE(wrap) | 
 
|  | 0 | 0 | && (wrap = _hv_fetchs_sv(opts, "wrap_dbrefs")) && SvTRUE(wrap) | 
 
|  | 0 | 0 | && (wrap = _hv_fetchs_sv(opts, "wrap_dbrefs")) && SvTRUE(wrap) | 
 
|  | 0 | 2 | && (wrap = _hv_fetchs_sv(opts, "wrap_dbrefs")) && SvTRUE(wrap) | 
 
|  | 0 | 0 | && (wrap = _hv_fetchs_sv(opts, "wrap_dbrefs")) && SvTRUE(wrap) | 
 
|  | 0 | 0 | && (wrap = _hv_fetchs_sv(opts, "wrap_dbrefs")) && SvTRUE(wrap) | 
 
|  | 0 | 0 | && (wrap = _hv_fetchs_sv(opts, "wrap_dbrefs")) && SvTRUE(wrap) | 
 
|  | 0 | 0 | && (wrap = _hv_fetchs_sv(opts, "wrap_dbrefs")) && SvTRUE(wrap) | 
 
|  | 2 | 0 | && (wrap = _hv_fetchs_sv(opts, "wrap_dbrefs")) && SvTRUE(wrap) | 
 
|  | 2 | 0 | && (wrap = _hv_fetchs_sv(opts, "wrap_dbrefs")) && SvTRUE(wrap) | 
 
|  | 1 | 1 | && (wrap = _hv_fetchs_sv(opts, "wrap_dbrefs")) && SvTRUE(wrap) | 
 
|  | 0 | 1 | && (wrap = _hv_fetchs_sv(opts, "wrap_dbrefs")) && SvTRUE(wrap) | 
 
|  | 0 | 0 | && (wrap = _hv_fetchs_sv(opts, "wrap_dbrefs")) && SvTRUE(wrap) | 
 
|  | 1 | 1 | && (wrap = _hv_fetchs_sv(opts, "wrap_dbrefs")) && SvTRUE(wrap) | 
 
| 1513 | 0 | 1472 | if ( depth > MAX_DEPTH ) { | 
 
| 1519 | 1536 | 1472 | while (bson_iter_next(iter)) { | 
 
| 1525 | 0 | 1536 | if ( ! is_utf8_string((const U8*)name,strlen(name))) { | 
 
| 1532 | 1462 | 74 | if ( key_num == 1 && strcmp( name, "$ref" ) ) is_dbref = 0; | 
 
|  | 1450 | 12 | if ( key_num == 1 && strcmp( name, "$ref" ) ) is_dbref = 0; | 
 
| 1533 | 21 | 1515 | if ( key_num == 2 && is_dbref == 1 && strcmp( name, "$id" ) ) is_dbref = 0; | 
 
|  | 12 | 9 | if ( key_num == 2 && is_dbref == 1 && strcmp( name, "$id" ) ) is_dbref = 0; | 
 
|  | 0 | 12 | if ( key_num == 2 && is_dbref == 1 && strcmp( name, "$id" ) ) is_dbref = 0; | 
 
| 1547 | 25 | 1447 | if ( !top && key_num >= 2 && is_dbref == 1 | 
 
|  | 12 | 13 | if ( !top && key_num >= 2 && is_dbref == 1 | 
 
|  | 10 | 2 | if ( !top && key_num >= 2 && is_dbref == 1 | 
 
| 1548 | 10 | 0 | && (wrap = _hv_fetchs_sv(opts, "wrap_dbrefs")) && SvTRUE(wrap) | 
 
|  | 10 | 0 | && (wrap = _hv_fetchs_sv(opts, "wrap_dbrefs")) && SvTRUE(wrap) | 
 
|  | 10 | 0 | && (wrap = _hv_fetchs_sv(opts, "wrap_dbrefs")) && SvTRUE(wrap) | 
 
|  | 10 | 0 | && (wrap = _hv_fetchs_sv(opts, "wrap_dbrefs")) && SvTRUE(wrap) | 
 
|  | 0 | 10 | && (wrap = _hv_fetchs_sv(opts, "wrap_dbrefs")) && SvTRUE(wrap) | 
 
|  | 0 | 10 | && (wrap = _hv_fetchs_sv(opts, "wrap_dbrefs")) && SvTRUE(wrap) | 
 
|  | 0 | 0 | && (wrap = _hv_fetchs_sv(opts, "wrap_dbrefs")) && SvTRUE(wrap) | 
 
|  | 0 | 0 | && (wrap = _hv_fetchs_sv(opts, "wrap_dbrefs")) && SvTRUE(wrap) | 
 
|  | 0 | 10 | && (wrap = _hv_fetchs_sv(opts, "wrap_dbrefs")) && SvTRUE(wrap) | 
 
|  | 0 | 0 | && (wrap = _hv_fetchs_sv(opts, "wrap_dbrefs")) && SvTRUE(wrap) | 
 
|  | 0 | 0 | && (wrap = _hv_fetchs_sv(opts, "wrap_dbrefs")) && SvTRUE(wrap) | 
 
|  | 0 | 0 | && (wrap = _hv_fetchs_sv(opts, "wrap_dbrefs")) && SvTRUE(wrap) | 
 
|  | 0 | 0 | && (wrap = _hv_fetchs_sv(opts, "wrap_dbrefs")) && SvTRUE(wrap) | 
 
|  | 10 | 0 | && (wrap = _hv_fetchs_sv(opts, "wrap_dbrefs")) && SvTRUE(wrap) | 
 
|  | 10 | 0 | && (wrap = _hv_fetchs_sv(opts, "wrap_dbrefs")) && SvTRUE(wrap) | 
 
|  | 0 | 10 | && (wrap = _hv_fetchs_sv(opts, "wrap_dbrefs")) && SvTRUE(wrap) | 
 
|  | 0 | 0 | && (wrap = _hv_fetchs_sv(opts, "wrap_dbrefs")) && SvTRUE(wrap) | 
 
|  | 0 | 0 | && (wrap = _hv_fetchs_sv(opts, "wrap_dbrefs")) && SvTRUE(wrap) | 
 
|  | 10 | 0 | && (wrap = _hv_fetchs_sv(opts, "wrap_dbrefs")) && SvTRUE(wrap) | 
 
| 1564 | 0 | 14 | if ( depth > MAX_DEPTH ) { | 
 
| 1568 | 22 | 14 | while (bson_iter_next(iter)) { | 
 
| 1573 | 22 | 0 | if ((sv = bson_elem_to_sv(iter, name, opts, depth))) { | 
 
| 1597 | 59 | 0 | if (Perl_isinf(SvNV(d)) || Perl_isnan(SvNV(d)) ) { | 
 
|  | 14 | 45 | if (Perl_isinf(SvNV(d)) || Perl_isnan(SvNV(d)) ) { | 
 
|  | 45 | 0 | if (Perl_isinf(SvNV(d)) || Perl_isnan(SvNV(d)) ) { | 
 
|  | 10 | 35 | if (Perl_isinf(SvNV(d)) || Perl_isnan(SvNV(d)) ) { | 
 
| 1598 | 0 | 24 | SvPV_nolen(d); /* force to PVNV for compatibility */ | 
 
| 1601 | 51 | 8 | if ( (tempsv = _hv_fetchs_sv(opts, "wrap_numbers")) && SvTRUE(tempsv) ) { | 
 
|  | 51 | 0 | if ( (tempsv = _hv_fetchs_sv(opts, "wrap_numbers")) && SvTRUE(tempsv) ) { | 
 
|  | 51 | 8 | if ( (tempsv = _hv_fetchs_sv(opts, "wrap_numbers")) && SvTRUE(tempsv) ) { | 
 
|  | 51 | 0 | if ( (tempsv = _hv_fetchs_sv(opts, "wrap_numbers")) && SvTRUE(tempsv) ) { | 
 
|  | 0 | 51 | if ( (tempsv = _hv_fetchs_sv(opts, "wrap_numbers")) && SvTRUE(tempsv) ) { | 
 
|  | 0 | 0 | if ( (tempsv = _hv_fetchs_sv(opts, "wrap_numbers")) && SvTRUE(tempsv) ) { | 
 
|  | 0 | 51 | if ( (tempsv = _hv_fetchs_sv(opts, "wrap_numbers")) && SvTRUE(tempsv) ) { | 
 
|  | 0 | 0 | if ( (tempsv = _hv_fetchs_sv(opts, "wrap_numbers")) && SvTRUE(tempsv) ) { | 
 
|  | 0 | 0 | if ( (tempsv = _hv_fetchs_sv(opts, "wrap_numbers")) && SvTRUE(tempsv) ) { | 
 
|  | 38 | 13 | if ( (tempsv = _hv_fetchs_sv(opts, "wrap_numbers")) && SvTRUE(tempsv) ) { | 
 
|  | 38 | 0 | if ( (tempsv = _hv_fetchs_sv(opts, "wrap_numbers")) && SvTRUE(tempsv) ) { | 
 
|  | 38 | 0 | if ( (tempsv = _hv_fetchs_sv(opts, "wrap_numbers")) && SvTRUE(tempsv) ) { | 
 
|  | 38 | 0 | if ( (tempsv = _hv_fetchs_sv(opts, "wrap_numbers")) && SvTRUE(tempsv) ) { | 
 
|  | 38 | 0 | if ( (tempsv = _hv_fetchs_sv(opts, "wrap_numbers")) && SvTRUE(tempsv) ) { | 
 
|  | 38 | 0 | if ( (tempsv = _hv_fetchs_sv(opts, "wrap_numbers")) && SvTRUE(tempsv) ) { | 
 
|  | 13 | 0 | if ( (tempsv = _hv_fetchs_sv(opts, "wrap_numbers")) && SvTRUE(tempsv) ) { | 
 
|  | 13 | 0 | if ( (tempsv = _hv_fetchs_sv(opts, "wrap_numbers")) && SvTRUE(tempsv) ) { | 
 
|  | 0 | 13 | if ( (tempsv = _hv_fetchs_sv(opts, "wrap_numbers")) && SvTRUE(tempsv) ) { | 
 
|  | 0 | 0 | if ( (tempsv = _hv_fetchs_sv(opts, "wrap_numbers")) && SvTRUE(tempsv) ) { | 
 
|  | 0 | 0 | if ( (tempsv = _hv_fetchs_sv(opts, "wrap_numbers")) && SvTRUE(tempsv) ) { | 
 
|  | 13 | 0 | if ( (tempsv = _hv_fetchs_sv(opts, "wrap_numbers")) && SvTRUE(tempsv) ) { | 
 
|  | 0 | 0 | if ( (tempsv = _hv_fetchs_sv(opts, "wrap_numbers")) && SvTRUE(tempsv) ) { | 
 
| 1616 | 12 | 103 | if (bson_iter_type(iter) == BSON_TYPE_SYMBOL) { | 
 
| 1622 | 3 | 112 | if ( ! is_utf8_string((const U8*)str,len)) { | 
 
| 1631 | 6 | 106 | if ( (wrap = _hv_fetchs_sv(opts, "wrap_strings")) && SvTRUE(wrap) ) { | 
 
|  | 6 | 0 | if ( (wrap = _hv_fetchs_sv(opts, "wrap_strings")) && SvTRUE(wrap) ) { | 
 
|  | 6 | 106 | if ( (wrap = _hv_fetchs_sv(opts, "wrap_strings")) && SvTRUE(wrap) ) { | 
 
|  | 6 | 0 | if ( (wrap = _hv_fetchs_sv(opts, "wrap_strings")) && SvTRUE(wrap) ) { | 
 
|  | 0 | 6 | if ( (wrap = _hv_fetchs_sv(opts, "wrap_strings")) && SvTRUE(wrap) ) { | 
 
|  | 0 | 0 | if ( (wrap = _hv_fetchs_sv(opts, "wrap_strings")) && SvTRUE(wrap) ) { | 
 
|  | 0 | 6 | if ( (wrap = _hv_fetchs_sv(opts, "wrap_strings")) && SvTRUE(wrap) ) { | 
 
|  | 0 | 0 | if ( (wrap = _hv_fetchs_sv(opts, "wrap_strings")) && SvTRUE(wrap) ) { | 
 
|  | 0 | 0 | if ( (wrap = _hv_fetchs_sv(opts, "wrap_strings")) && SvTRUE(wrap) ) { | 
 
|  | 0 | 6 | if ( (wrap = _hv_fetchs_sv(opts, "wrap_strings")) && SvTRUE(wrap) ) { | 
 
|  | 0 | 0 | if ( (wrap = _hv_fetchs_sv(opts, "wrap_strings")) && SvTRUE(wrap) ) { | 
 
|  | 0 | 0 | if ( (wrap = _hv_fetchs_sv(opts, "wrap_strings")) && SvTRUE(wrap) ) { | 
 
|  | 0 | 0 | if ( (wrap = _hv_fetchs_sv(opts, "wrap_strings")) && SvTRUE(wrap) ) { | 
 
|  | 0 | 0 | if ( (wrap = _hv_fetchs_sv(opts, "wrap_strings")) && SvTRUE(wrap) ) { | 
 
|  | 0 | 0 | if ( (wrap = _hv_fetchs_sv(opts, "wrap_strings")) && SvTRUE(wrap) ) { | 
 
|  | 6 | 0 | if ( (wrap = _hv_fetchs_sv(opts, "wrap_strings")) && SvTRUE(wrap) ) { | 
 
|  | 6 | 0 | if ( (wrap = _hv_fetchs_sv(opts, "wrap_strings")) && SvTRUE(wrap) ) { | 
 
|  | 0 | 6 | if ( (wrap = _hv_fetchs_sv(opts, "wrap_strings")) && SvTRUE(wrap) ) { | 
 
|  | 0 | 0 | if ( (wrap = _hv_fetchs_sv(opts, "wrap_strings")) && SvTRUE(wrap) ) { | 
 
|  | 0 | 0 | if ( (wrap = _hv_fetchs_sv(opts, "wrap_strings")) && SvTRUE(wrap) ) { | 
 
|  | 6 | 0 | if ( (wrap = _hv_fetchs_sv(opts, "wrap_strings")) && SvTRUE(wrap) ) { | 
 
|  | 0 | 0 | if ( (wrap = _hv_fetchs_sv(opts, "wrap_strings")) && SvTRUE(wrap) ) { | 
 
| 1662 | 5 | 23 | if ( BSON_UNLIKELY(type == BSON_SUBTYPE_BINARY_DEPRECATED) ) { | 
 
| 1670 | 3 | 2 | if ( sublen != len ) { | 
 
| 1687 | 12 | 6 | : newSVsv(get_sv("BSON::XS::_boolean_false", GV_ADD)); | 
 
| 1698 | 54 | 15 | if ( (tempsv = _hv_fetchs_sv(opts, "wrap_numbers")) && SvTRUE(tempsv) ) { | 
 
|  | 54 | 0 | if ( (tempsv = _hv_fetchs_sv(opts, "wrap_numbers")) && SvTRUE(tempsv) ) { | 
 
|  | 54 | 15 | if ( (tempsv = _hv_fetchs_sv(opts, "wrap_numbers")) && SvTRUE(tempsv) ) { | 
 
|  | 54 | 0 | if ( (tempsv = _hv_fetchs_sv(opts, "wrap_numbers")) && SvTRUE(tempsv) ) { | 
 
|  | 0 | 54 | if ( (tempsv = _hv_fetchs_sv(opts, "wrap_numbers")) && SvTRUE(tempsv) ) { | 
 
|  | 0 | 0 | if ( (tempsv = _hv_fetchs_sv(opts, "wrap_numbers")) && SvTRUE(tempsv) ) { | 
 
|  | 0 | 54 | if ( (tempsv = _hv_fetchs_sv(opts, "wrap_numbers")) && SvTRUE(tempsv) ) { | 
 
|  | 0 | 0 | if ( (tempsv = _hv_fetchs_sv(opts, "wrap_numbers")) && SvTRUE(tempsv) ) { | 
 
|  | 0 | 0 | if ( (tempsv = _hv_fetchs_sv(opts, "wrap_numbers")) && SvTRUE(tempsv) ) { | 
 
|  | 45 | 9 | if ( (tempsv = _hv_fetchs_sv(opts, "wrap_numbers")) && SvTRUE(tempsv) ) { | 
 
|  | 45 | 0 | if ( (tempsv = _hv_fetchs_sv(opts, "wrap_numbers")) && SvTRUE(tempsv) ) { | 
 
|  | 45 | 0 | if ( (tempsv = _hv_fetchs_sv(opts, "wrap_numbers")) && SvTRUE(tempsv) ) { | 
 
|  | 29 | 16 | if ( (tempsv = _hv_fetchs_sv(opts, "wrap_numbers")) && SvTRUE(tempsv) ) { | 
 
|  | 29 | 0 | if ( (tempsv = _hv_fetchs_sv(opts, "wrap_numbers")) && SvTRUE(tempsv) ) { | 
 
|  | 29 | 16 | if ( (tempsv = _hv_fetchs_sv(opts, "wrap_numbers")) && SvTRUE(tempsv) ) { | 
 
|  | 9 | 0 | if ( (tempsv = _hv_fetchs_sv(opts, "wrap_numbers")) && SvTRUE(tempsv) ) { | 
 
|  | 9 | 0 | if ( (tempsv = _hv_fetchs_sv(opts, "wrap_numbers")) && SvTRUE(tempsv) ) { | 
 
|  | 0 | 9 | if ( (tempsv = _hv_fetchs_sv(opts, "wrap_numbers")) && SvTRUE(tempsv) ) { | 
 
|  | 0 | 0 | if ( (tempsv = _hv_fetchs_sv(opts, "wrap_numbers")) && SvTRUE(tempsv) ) { | 
 
|  | 0 | 0 | if ( (tempsv = _hv_fetchs_sv(opts, "wrap_numbers")) && SvTRUE(tempsv) ) { | 
 
|  | 9 | 0 | if ( (tempsv = _hv_fetchs_sv(opts, "wrap_numbers")) && SvTRUE(tempsv) ) { | 
 
|  | 0 | 0 | if ( (tempsv = _hv_fetchs_sv(opts, "wrap_numbers")) && SvTRUE(tempsv) ) { | 
 
| 1710 | 21 | 4 | if ( (tempsv = _hv_fetchs_sv(opts, "wrap_numbers")) && SvTRUE(tempsv) ) { | 
 
|  | 21 | 0 | if ( (tempsv = _hv_fetchs_sv(opts, "wrap_numbers")) && SvTRUE(tempsv) ) { | 
 
|  | 21 | 4 | if ( (tempsv = _hv_fetchs_sv(opts, "wrap_numbers")) && SvTRUE(tempsv) ) { | 
 
|  | 21 | 0 | if ( (tempsv = _hv_fetchs_sv(opts, "wrap_numbers")) && SvTRUE(tempsv) ) { | 
 
|  | 0 | 21 | if ( (tempsv = _hv_fetchs_sv(opts, "wrap_numbers")) && SvTRUE(tempsv) ) { | 
 
|  | 0 | 0 | if ( (tempsv = _hv_fetchs_sv(opts, "wrap_numbers")) && SvTRUE(tempsv) ) { | 
 
|  | 0 | 21 | if ( (tempsv = _hv_fetchs_sv(opts, "wrap_numbers")) && SvTRUE(tempsv) ) { | 
 
|  | 0 | 0 | if ( (tempsv = _hv_fetchs_sv(opts, "wrap_numbers")) && SvTRUE(tempsv) ) { | 
 
|  | 0 | 0 | if ( (tempsv = _hv_fetchs_sv(opts, "wrap_numbers")) && SvTRUE(tempsv) ) { | 
 
|  | 17 | 4 | if ( (tempsv = _hv_fetchs_sv(opts, "wrap_numbers")) && SvTRUE(tempsv) ) { | 
 
|  | 17 | 0 | if ( (tempsv = _hv_fetchs_sv(opts, "wrap_numbers")) && SvTRUE(tempsv) ) { | 
 
|  | 17 | 0 | if ( (tempsv = _hv_fetchs_sv(opts, "wrap_numbers")) && SvTRUE(tempsv) ) { | 
 
|  | 17 | 0 | if ( (tempsv = _hv_fetchs_sv(opts, "wrap_numbers")) && SvTRUE(tempsv) ) { | 
 
|  | 17 | 0 | if ( (tempsv = _hv_fetchs_sv(opts, "wrap_numbers")) && SvTRUE(tempsv) ) { | 
 
|  | 17 | 0 | if ( (tempsv = _hv_fetchs_sv(opts, "wrap_numbers")) && SvTRUE(tempsv) ) { | 
 
|  | 4 | 0 | if ( (tempsv = _hv_fetchs_sv(opts, "wrap_numbers")) && SvTRUE(tempsv) ) { | 
 
|  | 4 | 0 | if ( (tempsv = _hv_fetchs_sv(opts, "wrap_numbers")) && SvTRUE(tempsv) ) { | 
 
|  | 0 | 4 | if ( (tempsv = _hv_fetchs_sv(opts, "wrap_numbers")) && SvTRUE(tempsv) ) { | 
 
|  | 0 | 0 | if ( (tempsv = _hv_fetchs_sv(opts, "wrap_numbers")) && SvTRUE(tempsv) ) { | 
 
|  | 0 | 0 | if ( (tempsv = _hv_fetchs_sv(opts, "wrap_numbers")) && SvTRUE(tempsv) ) { | 
 
|  | 4 | 0 | if ( (tempsv = _hv_fetchs_sv(opts, "wrap_numbers")) && SvTRUE(tempsv) ) { | 
 
|  | 0 | 0 | if ( (tempsv = _hv_fetchs_sv(opts, "wrap_numbers")) && SvTRUE(tempsv) ) { | 
 
| 1740 | 3 | 18 | if ( (dt_type_sv = _hv_fetchs_sv(opts, "dt_type")) && SvOK(dt_type_sv) ) { | 
 
|  | 3 | 0 | if ( (dt_type_sv = _hv_fetchs_sv(opts, "dt_type")) && SvOK(dt_type_sv) ) { | 
 
|  | 3 | 18 | if ( (dt_type_sv = _hv_fetchs_sv(opts, "dt_type")) && SvOK(dt_type_sv) ) { | 
 
|  | 1 | 2 | if ( (dt_type_sv = _hv_fetchs_sv(opts, "dt_type")) && SvOK(dt_type_sv) ) { | 
 
|  | 1 | 0 | if ( (dt_type_sv = _hv_fetchs_sv(opts, "dt_type")) && SvOK(dt_type_sv) ) { | 
 
|  | 0 | 1 | if ( (dt_type_sv = _hv_fetchs_sv(opts, "dt_type")) && SvOK(dt_type_sv) ) { | 
 
| 1741 | 2 | 0 | char *dt_type = SvPV_nolen(dt_type_sv); | 
 
| 1742 | 1 | 1 | if ( strEQ(dt_type, "BSON::Time") ) { | 
 
| 1745 | 0 | 1 | } else if ( strEQ(dt_type, "Time::Moment") ) { | 
 
| 1747 | 0 | 1 | } else if ( strEQ(dt_type, "DateTime") ) { | 
 
| 1749 | 0 | 1 | } else if ( strEQ(dt_type, "DateTime::Tiny") ) { | 
 
| 1751 | 0 | 1 | } else if ( strEQ(dt_type, "Mango::BSON::Time") ) { | 
 
| 1787 | 0 | 9 | if ( ! is_utf8_string((const U8*)code,len)) { | 
 
| 1809 | 0 | 13 | if ( ! is_utf8_string((const U8*)code,code_len)) { | 
 
| 1816 | 13 | 0 | if ( ! ( bson_init_static(&bson, scope, scope_len) && bson_iter_init(&child, &bson) ) ) { | 
 
|  | 0 | 13 | if ( ! ( bson_init_static(&bson, scope, scope_len) && bson_iter_init(&child, &bson) ) ) { | 
 
| 1852 | 0 | 1206 | if ( ! bson_iter_decimal128(iter, &dec) ) { | 
 
| 1876 | 1 | 6 | if ( ! is_utf8_string((const U8*)collection,len)) { | 
 
| 1934 | 1622 | 0 | data = SvPV(msg, length); | 
 
| 1937 | 1622 | 0 | if ( options ) { | 
 
| 1938 | 1622 | 0 | if ( SvROK(options) && SvTYPE(SvRV(options)) == SVt_PVHV ) { | 
 
|  | 1622 | 0 | if ( SvROK(options) && SvTYPE(SvRV(options)) == SVt_PVHV ) { | 
 
| 1946 | 15 | 1607 | if ( ! bson_init_static(&bson, (uint8_t *) data, length) ) { | 
 
| 1950 | 48 | 1559 | if ( ! bson_validate(&bson, BSON_VALIDATE_NONE, &error_offset, &invalid_key, &invalid_type) ) { | 
 
| 1954 | 5 | 1554 | if ( invalid_type != 0 ) { | 
 
| 1958 | 0 | 1554 | if ( ! bson_iter_init(&iter, &bson) ) { | 
 
| 1962 | 0 | 1554 | XPUSHs(sv_2mortal(bson_doc_to_hashref(&iter, opts, 0, TRUE))); | 
 
| 1974 | 1956 | 0 | if ( options ) { | 
 
| 1975 | 1956 | 0 | if ( SvROK(options) && SvTYPE(SvRV(options)) == SVt_PVHV ) { | 
 
|  | 1956 | 0 | if ( SvROK(options) && SvTYPE(SvRV(options)) == SVt_PVHV ) { | 
 
| 1983 | 0 | 1945 | XPUSHs(sv_2mortal(newSVpvn((const char *)bson_get_data(bson), bson->len))); |