line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
71
|
|
|
71
|
|
25344
|
use 5.010001; |
|
71
|
|
|
|
|
224
|
|
2
|
71
|
|
|
71
|
|
332
|
use strict; |
|
71
|
|
|
|
|
120
|
|
|
71
|
|
|
|
|
1380
|
|
3
|
71
|
|
|
71
|
|
289
|
use warnings; |
|
71
|
|
|
|
|
121
|
|
|
71
|
|
|
|
|
2191
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package BSON::MaxKey; |
6
|
|
|
|
|
|
|
# ABSTRACT: BSON type wrapper for MaxKey |
7
|
|
|
|
|
|
|
|
8
|
71
|
|
|
71
|
|
334
|
use version; |
|
71
|
|
|
|
|
113
|
|
|
71
|
|
|
|
|
274
|
|
9
|
|
|
|
|
|
|
our $VERSION = 'v1.12.0'; |
10
|
|
|
|
|
|
|
|
11
|
71
|
|
|
71
|
|
5258
|
use Carp; |
|
71
|
|
|
|
|
203
|
|
|
71
|
|
|
|
|
11552
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
my $singleton = bless \(my $x), __PACKAGE__; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub new { |
16
|
17056
|
|
|
17056
|
0
|
171499
|
return $singleton; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
#pod =method TO_JSON |
20
|
|
|
|
|
|
|
#pod |
21
|
|
|
|
|
|
|
#pod If the C option is true, returns a hashref compatible with |
22
|
|
|
|
|
|
|
#pod MongoDB's L |
23
|
|
|
|
|
|
|
#pod format, which represents it as a document as follows: |
24
|
|
|
|
|
|
|
#pod |
25
|
|
|
|
|
|
|
#pod {"$maxKey" : 1} |
26
|
|
|
|
|
|
|
#pod |
27
|
|
|
|
|
|
|
#pod If the C option is false, an error is thrown, as this value |
28
|
|
|
|
|
|
|
#pod can't otherwise be represented in JSON. |
29
|
|
|
|
|
|
|
#pod |
30
|
|
|
|
|
|
|
#pod =cut |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub TO_JSON { |
33
|
6
|
100
|
|
6
|
1
|
181
|
if ( $ENV{BSON_EXTJSON} ) { |
34
|
5
|
|
|
|
|
24
|
return { '$maxKey' => 1 }; |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
1
|
|
|
|
|
188
|
croak( "The value '$_[0]' is illegal in JSON" ); |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
1; |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=pod |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=encoding UTF-8 |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=head1 NAME |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
BSON::MaxKey - BSON type wrapper for MaxKey |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=head1 VERSION |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
version v1.12.0 |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=head1 SYNOPSIS |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
use BSON::Types ':all'; |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
bson_maxkey(); |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=head1 DESCRIPTION |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
This module provides a BSON type wrapper for the special BSON "MaxKey" type. |
63
|
|
|
|
|
|
|
The object returned is a singleton. |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=head1 METHODS |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=head2 TO_JSON |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
If the C option is true, returns a hashref compatible with |
70
|
|
|
|
|
|
|
MongoDB's L |
71
|
|
|
|
|
|
|
format, which represents it as a document as follows: |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
{"$maxKey" : 1} |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
If the C option is false, an error is thrown, as this value |
76
|
|
|
|
|
|
|
can't otherwise be represented in JSON. |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=for Pod::Coverage new |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=head1 AUTHORS |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=over 4 |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=item * |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
David Golden |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=item * |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
Stefan G. |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=back |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
This software is Copyright (c) 2019 by Stefan G. and MongoDB, Inc. |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
This is free software, licensed under: |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
The Apache License, Version 2.0, January 2004 |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
=cut |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
__END__ |