line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# automatically generated file, don't edit |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
# Copyright 2023 David Cantrell, derived from data from libphonenumber |
6
|
|
|
|
|
|
|
# http://code.google.com/p/libphonenumber/ |
7
|
|
|
|
|
|
|
# |
8
|
|
|
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License"); |
9
|
|
|
|
|
|
|
# you may not use this file except in compliance with the License. |
10
|
|
|
|
|
|
|
# You may obtain a copy of the License at |
11
|
|
|
|
|
|
|
# |
12
|
|
|
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0 |
13
|
|
|
|
|
|
|
# |
14
|
|
|
|
|
|
|
# Unless required by applicable law or agreed to in writing, software |
15
|
|
|
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS, |
16
|
|
|
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
17
|
|
|
|
|
|
|
# See the License for the specific language governing permissions and |
18
|
|
|
|
|
|
|
# limitations under the License. |
19
|
|
|
|
|
|
|
package Number::Phone::StubCountry::GN; |
20
|
2
|
|
|
2
|
|
1147
|
use base qw(Number::Phone::StubCountry); |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
222
|
|
21
|
|
|
|
|
|
|
|
22
|
2
|
|
|
2
|
|
14
|
use strict; |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
49
|
|
23
|
2
|
|
|
2
|
|
11
|
use warnings; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
55
|
|
24
|
2
|
|
|
2
|
|
15
|
use utf8; |
|
2
|
|
|
|
|
8
|
|
|
2
|
|
|
|
|
15
|
|
25
|
|
|
|
|
|
|
our $VERSION = 1.20230903131447; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
my $formatters = [ |
28
|
|
|
|
|
|
|
{ |
29
|
|
|
|
|
|
|
'format' => '$1 $2 $3 $4', |
30
|
|
|
|
|
|
|
'leading_digits' => '3', |
31
|
|
|
|
|
|
|
'pattern' => '(\\d{2})(\\d{2})(\\d{2})(\\d{2})' |
32
|
|
|
|
|
|
|
}, |
33
|
|
|
|
|
|
|
{ |
34
|
|
|
|
|
|
|
'format' => '$1 $2 $3 $4', |
35
|
|
|
|
|
|
|
'leading_digits' => '[67]', |
36
|
|
|
|
|
|
|
'pattern' => '(\\d{3})(\\d{2})(\\d{2})(\\d{2})' |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
]; |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
my $validators = { |
41
|
|
|
|
|
|
|
'fixed_line' => ' |
42
|
|
|
|
|
|
|
3(?: |
43
|
|
|
|
|
|
|
0(?: |
44
|
|
|
|
|
|
|
24| |
45
|
|
|
|
|
|
|
3[12]| |
46
|
|
|
|
|
|
|
4[1-35-7]| |
47
|
|
|
|
|
|
|
5[13]| |
48
|
|
|
|
|
|
|
6[189]| |
49
|
|
|
|
|
|
|
[78]1| |
50
|
|
|
|
|
|
|
9[1478] |
51
|
|
|
|
|
|
|
)| |
52
|
|
|
|
|
|
|
1\\d\\d |
53
|
|
|
|
|
|
|
)\\d{4} |
54
|
|
|
|
|
|
|
', |
55
|
|
|
|
|
|
|
'geographic' => ' |
56
|
|
|
|
|
|
|
3(?: |
57
|
|
|
|
|
|
|
0(?: |
58
|
|
|
|
|
|
|
24| |
59
|
|
|
|
|
|
|
3[12]| |
60
|
|
|
|
|
|
|
4[1-35-7]| |
61
|
|
|
|
|
|
|
5[13]| |
62
|
|
|
|
|
|
|
6[189]| |
63
|
|
|
|
|
|
|
[78]1| |
64
|
|
|
|
|
|
|
9[1478] |
65
|
|
|
|
|
|
|
)| |
66
|
|
|
|
|
|
|
1\\d\\d |
67
|
|
|
|
|
|
|
)\\d{4} |
68
|
|
|
|
|
|
|
', |
69
|
|
|
|
|
|
|
'mobile' => '6[0-356]\\d{7}', |
70
|
|
|
|
|
|
|
'pager' => '', |
71
|
|
|
|
|
|
|
'personal_number' => '', |
72
|
|
|
|
|
|
|
'specialrate' => '', |
73
|
|
|
|
|
|
|
'toll_free' => '', |
74
|
|
|
|
|
|
|
'voip' => '722\\d{6}' |
75
|
|
|
|
|
|
|
}; |
76
|
|
|
|
|
|
|
my %areanames = (); |
77
|
|
|
|
|
|
|
$areanames{en} = {"2243051", "Labé", |
78
|
|
|
|
|
|
|
"2243053", "Pita", |
79
|
|
|
|
|
|
|
"2243098", "Kissidougou", |
80
|
|
|
|
|
|
|
"2243032", "Kamsar", |
81
|
|
|
|
|
|
|
"2243094", "Macenta", |
82
|
|
|
|
|
|
|
"2243097", "Guéckédou", |
83
|
|
|
|
|
|
|
"2243068", "Mamou", |
84
|
|
|
|
|
|
|
"224302", "Fria", |
85
|
|
|
|
|
|
|
"2243041", "Conakry", |
86
|
|
|
|
|
|
|
"2243043", "Conakry", |
87
|
|
|
|
|
|
|
"2243047", "Conakry", |
88
|
|
|
|
|
|
|
"2243069", "Dalaba", |
89
|
|
|
|
|
|
|
"2243091", "N\'Zérékoré", |
90
|
|
|
|
|
|
|
"22430613", "Télimélé", |
91
|
|
|
|
|
|
|
"224308", "Faranah", |
92
|
|
|
|
|
|
|
"2243042", "Sangoya", |
93
|
|
|
|
|
|
|
"2243045", "Conakry", |
94
|
|
|
|
|
|
|
"224307", "Kankan", |
95
|
|
|
|
|
|
|
"2243061", "Kindia", |
96
|
|
|
|
|
|
|
"2243031", "Boké", |
97
|
|
|
|
|
|
|
"2243046", "Boussoura",}; |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
sub new { |
100
|
10
|
|
|
10
|
1
|
23
|
my $class = shift; |
101
|
10
|
|
|
|
|
20
|
my $number = shift; |
102
|
10
|
|
|
|
|
75
|
$number =~ s/(^\+224|\D)//g; |
103
|
10
|
|
|
|
|
72
|
my $self = bless({ country_code => '224', number => $number, formatters => $formatters, validators => $validators, areanames => \%areanames}, $class); |
104
|
10
|
100
|
|
|
|
54
|
return $self->is_valid() ? $self : undef; |
105
|
|
|
|
|
|
|
} |
106
|
|
|
|
|
|
|
1; |