line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package MaxMind::DB::Reader::Role::HasDecoder; |
2
|
|
|
|
|
|
|
|
3
|
21
|
|
|
21
|
|
10373
|
use strict; |
|
21
|
|
|
|
|
25
|
|
|
21
|
|
|
|
|
615
|
|
4
|
21
|
|
|
21
|
|
68
|
use warnings; |
|
21
|
|
|
|
|
22
|
|
|
21
|
|
|
|
|
434
|
|
5
|
21
|
|
|
21
|
|
68
|
use namespace::autoclean; |
|
21
|
|
|
|
|
19
|
|
|
21
|
|
|
|
|
96
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '1.000013'; |
8
|
|
|
|
|
|
|
|
9
|
21
|
|
|
21
|
|
1289
|
use MaxMind::DB::Common qw( DATA_SECTION_SEPARATOR_SIZE ); |
|
21
|
|
|
|
|
23
|
|
|
21
|
|
|
|
|
903
|
|
10
|
21
|
|
|
21
|
|
78
|
use MaxMind::DB::Reader::Decoder; |
|
21
|
|
|
|
|
19
|
|
|
21
|
|
|
|
|
375
|
|
11
|
21
|
|
|
21
|
|
57
|
use MaxMind::DB::Types qw( Decoder ); |
|
21
|
|
|
|
|
19
|
|
|
21
|
|
|
|
|
698
|
|
12
|
|
|
|
|
|
|
|
13
|
21
|
|
|
21
|
|
60
|
use Moo::Role; |
|
21
|
|
|
|
|
21
|
|
|
21
|
|
|
|
|
97
|
|
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
|
|
1591
|
my $self = shift; |
30
|
|
|
|
|
|
|
|
31
|
16
|
|
|
|
|
106
|
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; |