| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
# |
|
2
|
|
|
|
|
|
|
# Copyright 2016 MongoDB, Inc. |
|
3
|
|
|
|
|
|
|
# |
|
4
|
|
|
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License"); |
|
5
|
|
|
|
|
|
|
# you may not use this file except in compliance with the License. |
|
6
|
|
|
|
|
|
|
# You may obtain a copy of the License at |
|
7
|
|
|
|
|
|
|
# |
|
8
|
|
|
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0 |
|
9
|
|
|
|
|
|
|
# |
|
10
|
|
|
|
|
|
|
# Unless required by applicable law or agreed to in writing, software |
|
11
|
|
|
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS, |
|
12
|
|
|
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
13
|
|
|
|
|
|
|
# See the License for the specific language governing permissions and |
|
14
|
|
|
|
|
|
|
# limitations under the License. |
|
15
|
|
|
|
|
|
|
|
|
16
|
58
|
|
|
58
|
|
10688274
|
use 5.010001; |
|
|
58
|
|
|
|
|
633
|
|
|
17
|
58
|
|
|
58
|
|
347
|
use strict; |
|
|
58
|
|
|
|
|
134
|
|
|
|
58
|
|
|
|
|
1501
|
|
|
18
|
58
|
|
|
58
|
|
314
|
use warnings; |
|
|
58
|
|
|
|
|
119
|
|
|
|
58
|
|
|
|
|
2467
|
|
|
19
|
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
package BSON::XS; |
|
21
|
|
|
|
|
|
|
# ABSTRACT: XS implementation of MongoDB's BSON serialization |
|
22
|
|
|
|
|
|
|
|
|
23
|
58
|
|
|
58
|
|
406
|
use version; |
|
|
58
|
|
|
|
|
148
|
|
|
|
58
|
|
|
|
|
363
|
|
|
24
|
|
|
|
|
|
|
our $VERSION = 'v0.8.3'; |
|
25
|
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
# cached for efficiency during decoding |
|
27
|
|
|
|
|
|
|
# XXX eventually move this into XS |
|
28
|
58
|
|
|
58
|
|
6044
|
use boolean; |
|
|
58
|
|
|
|
|
148
|
|
|
|
58
|
|
|
|
|
546
|
|
|
29
|
|
|
|
|
|
|
our $_boolean_true = true; |
|
30
|
|
|
|
|
|
|
our $_boolean_false = false; |
|
31
|
|
|
|
|
|
|
|
|
32
|
58
|
|
|
58
|
|
6667
|
use XSLoader; |
|
|
58
|
|
|
|
|
137
|
|
|
|
58
|
|
|
|
|
8809
|
|
|
33
|
|
|
|
|
|
|
XSLoader::load( "BSON::XS", $VERSION ); |
|
34
|
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
# For errors |
|
36
|
|
|
|
|
|
|
sub _printable { |
|
37
|
1
|
|
|
1
|
|
7273
|
my $value = shift; |
|
38
|
1
|
|
|
|
|
8
|
$value =~ s/([^[:print:]])/sprintf("\\x%02x",ord($1))/ge; |
|
|
1
|
|
|
|
|
7
|
|
|
39
|
1
|
|
|
|
|
9
|
return $value; |
|
40
|
|
|
|
|
|
|
} |
|
41
|
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
1; |
|
43
|
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=pod |
|
45
|
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=encoding UTF-8 |
|
47
|
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=head1 NAME |
|
49
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
BSON::XS - XS implementation of MongoDB's BSON serialization |
|
51
|
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=head1 VERSION |
|
53
|
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
version v0.8.3 |
|
55
|
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=head1 END OF LIFE NOTICE |
|
57
|
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
Version v0.8.0 is the final feature release of the MongoDB BSON::XS |
|
59
|
|
|
|
|
|
|
library. The library is now in a 12-month "sunset" period and will |
|
60
|
|
|
|
|
|
|
receive security patches and critical bug fixes only. The BSON::XS |
|
61
|
|
|
|
|
|
|
library will be end-of-life and unsupported on August 13, 2020. |
|
62
|
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
64
|
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
This module contains an XS implementation for BSON encoding and |
|
66
|
|
|
|
|
|
|
decoding. There is no public API. Use the L module and it will |
|
67
|
|
|
|
|
|
|
choose the best implementation for you. |
|
68
|
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=for :stopwords cpan testmatrix url bugtracker rt cpants kwalitee diff irc mailto metadata placeholders metacpan |
|
70
|
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=head1 SUPPORT |
|
72
|
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=head2 Bugs / Feature Requests |
|
74
|
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
Please report any bugs or feature requests through the issue tracker |
|
76
|
|
|
|
|
|
|
at L. |
|
77
|
|
|
|
|
|
|
You will be notified automatically of any progress on your issue. |
|
78
|
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
=head2 Source Code |
|
80
|
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
This is open source software. The code repository is available for |
|
82
|
|
|
|
|
|
|
public review and contribution under the terms of the license. |
|
83
|
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
L |
|
85
|
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
git clone https://github.com/mongodb/mongo-perl-bson-xs.git |
|
87
|
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=head1 AUTHOR |
|
89
|
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
David Golden |
|
91
|
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=head1 CONTRIBUTOR |
|
93
|
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
=for stopwords Paul "LeoNerd" Evans |
|
95
|
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
Paul "LeoNerd" Evans |
|
97
|
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
|
99
|
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
This software is Copyright (c) 2020 by MongoDB, Inc. |
|
101
|
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
This is free software, licensed under: |
|
103
|
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
The Apache License, Version 2.0, January 2004 |
|
105
|
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
=cut |
|
107
|
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
__END__ |