MaxMind/DB/Common.pm

filter: Statementstmt 100% 19 / 19 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod n/a totaltotal 100% 24 / 24 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« MaxMind/DB/Types.pm ↑ Summary
1 package MaxMind::DB::Common;
2  
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 1 our $VERSION = '0.040001';
7  
8 1 my $separator_size;
9  
10 1 ▶BEGIN {
Subroutine BEGIN: called CC=1 SCAR=0.0
11 1 $separator_size = 16;
12 }
13  
14 1 ▶use constant {
Subroutine BEGIN: called CC=1 SCAR=0.0
15 1 LEFT_RECORD => 0,
16 RIGHT_RECORD => 1,
17 DATA_SECTION_SEPARATOR_SIZE => $separator_size,
18 DATA_SECTION_SEPARATOR => ( "\0" x $separator_size ),
19 METADATA_MARKER => "\xab\xcd\xefMaxMind.com",
20 1 };
21  
22 1 ▶use Exporter qw( import );
Subroutine BEGIN: called CC=1 SCAR=0.0
23  
24 ## no critic (Variables::ProhibitPackageVars)
25 1 our %TypeNumToName = (
26 0 => 'extended',
27 1 => 'pointer',
28 2 => 'utf8_string',
29 3 => 'double',
30 4 => 'bytes',
31 5 => 'uint16',
32 6 => 'uint32',
33 7 => 'map',
34 8 => 'int32',
35 9 => 'uint64',
36 10 => 'uint128',
37 11 => 'array',
38 12 => 'container',
39 13 => 'end_marker',
40 14 => 'boolean',
41 15 => 'float',
42 );
43  
44 1 our %TypeNameToNum = reverse %TypeNumToName;
45  
46 1 our @EXPORT_OK = qw(
47 LEFT_RECORD
48 RIGHT_RECORD
49 DATA_SECTION_SEPARATOR_SIZE
50 DATA_SECTION_SEPARATOR
51 METADATA_MARKER
52 %TypeNumToName
53 %TypeNameToNum
54 );
55  
56 1 1;
57  
58 # ABSTRACT: Code shared by the MaxMind DB reader and writer modules
59  
60 __END__
« MaxMind/DB/Types.pm ↑ Summary