line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package MaxMind::DB::Reader::Role::HasDecoder; |
2
|
|
|
|
|
|
|
|
3
|
21
|
|
|
21
|
|
12286
|
use strict; |
|
21
|
|
|
|
|
31
|
|
|
21
|
|
|
|
|
589
|
|
4
|
21
|
|
|
21
|
|
103
|
use warnings; |
|
21
|
|
|
|
|
27
|
|
|
21
|
|
|
|
|
569
|
|
5
|
21
|
|
|
21
|
|
83
|
use namespace::autoclean; |
|
21
|
|
|
|
|
22
|
|
|
21
|
|
|
|
|
147
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '1.000012'; |
8
|
|
|
|
|
|
|
|
9
|
21
|
|
|
21
|
|
1654
|
use MaxMind::DB::Common qw( DATA_SECTION_SEPARATOR_SIZE ); |
|
21
|
|
|
|
|
26
|
|
|
21
|
|
|
|
|
1182
|
|
10
|
21
|
|
|
21
|
|
92
|
use MaxMind::DB::Reader::Decoder; |
|
21
|
|
|
|
|
26
|
|
|
21
|
|
|
|
|
415
|
|
11
|
21
|
|
|
21
|
|
68
|
use MaxMind::DB::Types qw( Decoder ); |
|
21
|
|
|
|
|
23
|
|
|
21
|
|
|
|
|
778
|
|
12
|
|
|
|
|
|
|
|
13
|
21
|
|
|
21
|
|
85
|
use Moo::Role; |
|
21
|
|
|
|
|
31
|
|
|
21
|
|
|
|
|
133
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
with 'MaxMind::DB::Role::Debugs'; |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
# Can't require accessors :( |
18
|
|
|
|
|
|
|
# requires 'data_source', '_search_tree_size'; |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
has _decoder => ( |
21
|
|
|
|
|
|
|
is => 'ro', |
22
|
|
|
|
|
|
|
isa => Decoder, |
23
|
|
|
|
|
|
|
init_arg => undef, |
24
|
|
|
|
|
|
|
lazy => 1, |
25
|
|
|
|
|
|
|
builder => '_build_decoder', |
26
|
|
|
|
|
|
|
); |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub _build_decoder { |
29
|
16
|
|
|
16
|
|
1978
|
my $self = shift; |
30
|
|
|
|
|
|
|
|
31
|
16
|
|
|
|
|
127
|
return MaxMind::DB::Reader::Decoder->new( |
32
|
|
|
|
|
|
|
data_source => $self->data_source(), |
33
|
|
|
|
|
|
|
pointer_base => $self->_search_tree_size() |
34
|
|
|
|
|
|
|
+ DATA_SECTION_SEPARATOR_SIZE, |
35
|
|
|
|
|
|
|
); |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
1; |