line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
71
|
|
|
71
|
|
24190
|
use 5.010001; |
|
71
|
|
|
|
|
225
|
|
2
|
71
|
|
|
71
|
|
415
|
use strict; |
|
71
|
|
|
|
|
131
|
|
|
71
|
|
|
|
|
1228
|
|
3
|
71
|
|
|
71
|
|
280
|
use warnings; |
|
71
|
|
|
|
|
130
|
|
|
71
|
|
|
|
|
3456
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package BSON::DBPointer; |
6
|
|
|
|
|
|
|
# ABSTRACT: Legacy BSON type wrapper for DBPointer data (DEPRECATED) |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
our $VERSION = 'v1.12.0'; |
9
|
|
|
|
|
|
|
|
10
|
71
|
|
|
71
|
|
405
|
use Moo 2.002004; |
|
71
|
|
|
|
|
921
|
|
|
71
|
|
|
|
|
395
|
|
11
|
71
|
|
|
71
|
|
19449
|
use Tie::IxHash; |
|
71
|
|
|
|
|
154
|
|
|
71
|
|
|
|
|
2209
|
|
12
|
71
|
|
|
71
|
|
404
|
use namespace::clean -except => 'meta'; |
|
71
|
|
|
|
|
164
|
|
|
71
|
|
|
|
|
452
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
extends 'BSON::DBRef'; |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub TO_JSON { |
18
|
4
|
|
|
4
|
1
|
7
|
my $self = shift; |
19
|
|
|
|
|
|
|
|
20
|
4
|
50
|
|
|
|
10
|
if ( $ENV{BSON_EXTJSON} ) { |
21
|
|
|
|
|
|
|
|
22
|
4
|
|
|
|
|
13
|
my $id = $self->id; |
23
|
4
|
50
|
|
|
|
8
|
if (ref $id) { |
24
|
4
|
|
|
|
|
12
|
$id = $id->TO_JSON; |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
else { |
27
|
0
|
|
|
|
|
0
|
$id = BSON->perl_to_extjson($id); |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
4
|
|
|
|
|
6
|
my %data; |
31
|
4
|
|
|
|
|
25
|
tie( %data, 'Tie::IxHash' ); |
32
|
4
|
|
|
|
|
61
|
$data{'$ref'} = $self->ref; |
33
|
4
|
|
|
|
|
54
|
$data{'$id'} = $id; |
34
|
4
|
50
|
|
|
|
49
|
$data{'$db'} = $self->db |
35
|
|
|
|
|
|
|
if defined $self->db; |
36
|
|
|
|
|
|
|
|
37
|
4
|
|
|
|
|
11
|
my $extra = $self->extra; |
38
|
|
|
|
|
|
|
$data{$_} = $extra->{$_} |
39
|
4
|
|
|
|
|
12
|
for keys %$extra; |
40
|
|
|
|
|
|
|
|
41
|
4
|
|
|
|
|
12
|
return \%data; |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
|
44
|
0
|
|
|
|
|
|
Carp::croak( "The value '$self' is illegal in JSON" ); |
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
1; |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=pod |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=encoding UTF-8 |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=head1 NAME |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
BSON::DBPointer - Legacy BSON type wrapper for DBPointer data (DEPRECATED) |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=head1 VERSION |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
version v1.12.0 |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=head1 DESCRIPTION |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
This module wraps the deprecated BSON "DBPointer" type. |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
You are strongly encouraged to use L instead. |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=head1 AUTHORS |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=over 4 |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=item * |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
David Golden |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=item * |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
Stefan G. |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
=back |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
This software is Copyright (c) 2019 by Stefan G. and MongoDB, Inc. |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
This is free software, licensed under: |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
The Apache License, Version 2.0, January 2004 |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
=cut |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
__END__ |