line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package MaxMind::DB::Role::Debugs; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
795
|
use strict; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
55
|
|
4
|
2
|
|
|
2
|
|
9
|
use warnings; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
46
|
|
5
|
2
|
|
|
2
|
|
7
|
use namespace::autoclean; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
10
|
|
6
|
2
|
|
|
2
|
|
828
|
use autodie; |
|
2
|
|
|
|
|
32578
|
|
|
2
|
|
|
|
|
10
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
our $VERSION = '0.040000'; |
9
|
|
|
|
|
|
|
|
10
|
2
|
|
|
2
|
|
8508
|
use Moo::Role; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
15
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub _debug_newline { |
13
|
0
|
|
|
0
|
|
|
warn "\n"; |
14
|
|
|
|
|
|
|
} |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub _debug_binary { |
17
|
0
|
|
|
0
|
|
|
my $self = shift; |
18
|
0
|
|
|
|
|
|
my $label = shift; |
19
|
0
|
|
|
|
|
|
my $binary = shift; |
20
|
|
|
|
|
|
|
|
21
|
0
|
|
|
|
|
|
my $msg = "$label: "; |
22
|
|
|
|
|
|
|
|
23
|
0
|
0
|
|
|
|
|
if ( defined $binary ) { |
24
|
0
|
|
|
|
|
|
$msg .= join q{ }, map { sprintf( '%08b', ord($_) ) } split //, |
|
0
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
$binary; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
else { |
28
|
0
|
|
|
|
|
|
$msg .= ''; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
0
|
|
|
|
|
|
warn "$msg\n"; |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
sub _debug_string { |
35
|
0
|
|
|
0
|
|
|
my $self = shift; |
36
|
0
|
|
|
|
|
|
my $label = shift; |
37
|
0
|
|
|
|
|
|
my $string = shift; |
38
|
|
|
|
|
|
|
|
39
|
0
|
0
|
|
|
|
|
$string = '' |
40
|
|
|
|
|
|
|
unless defined $string; |
41
|
|
|
|
|
|
|
|
42
|
0
|
|
|
|
|
|
warn "$label: $string\n"; |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
sub _debug_sprintf { |
46
|
0
|
|
|
0
|
|
|
my $self = shift; |
47
|
|
|
|
|
|
|
|
48
|
0
|
|
|
|
|
|
warn sprintf( shift() . "\n", @_ ); |
49
|
|
|
|
|
|
|
} |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
sub _debug_structure { |
52
|
0
|
|
|
0
|
|
|
my $self = shift; |
53
|
0
|
|
|
|
|
|
my $label = shift; |
54
|
0
|
|
|
|
|
|
my $structure = shift; |
55
|
|
|
|
|
|
|
|
56
|
0
|
|
|
|
|
|
require Data::Dumper::Concise; |
57
|
0
|
|
|
|
|
|
warn "$label: \n"; |
58
|
0
|
|
|
|
|
|
my $dumped = Data::Dumper::Concise::Dumper($structure); |
59
|
|
|
|
|
|
|
|
60
|
0
|
|
|
|
|
|
$dumped =~ s/^/ /mg; |
61
|
|
|
|
|
|
|
|
62
|
0
|
|
|
|
|
|
warn $dumped; |
63
|
|
|
|
|
|
|
} |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
sub _debug_message { |
66
|
0
|
|
|
0
|
|
|
my $self = shift; |
67
|
0
|
|
|
|
|
|
my $msg = shift; |
68
|
|
|
|
|
|
|
|
69
|
0
|
|
|
|
|
|
warn "$msg\n"; |
70
|
|
|
|
|
|
|
} |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
1; |