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::GM; |
20
|
2
|
|
|
2
|
|
1074
|
use base qw(Number::Phone::StubCountry); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
212
|
|
21
|
|
|
|
|
|
|
|
22
|
2
|
|
|
2
|
|
14
|
use strict; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
43
|
|
23
|
2
|
|
|
2
|
|
16
|
use warnings; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
44
|
|
24
|
2
|
|
|
2
|
|
13
|
use utf8; |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
12
|
|
25
|
|
|
|
|
|
|
our $VERSION = 1.20230307181420; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
my $formatters = [ |
28
|
|
|
|
|
|
|
{ |
29
|
|
|
|
|
|
|
'format' => '$1 $2', |
30
|
|
|
|
|
|
|
'leading_digits' => '[2-9]', |
31
|
|
|
|
|
|
|
'pattern' => '(\\d{3})(\\d{4})' |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
]; |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
my $validators = { |
36
|
|
|
|
|
|
|
'fixed_line' => ' |
37
|
|
|
|
|
|
|
(?: |
38
|
|
|
|
|
|
|
4(?: |
39
|
|
|
|
|
|
|
[23]\\d\\d| |
40
|
|
|
|
|
|
|
4(?: |
41
|
|
|
|
|
|
|
1[024679]| |
42
|
|
|
|
|
|
|
[6-9]\\d |
43
|
|
|
|
|
|
|
) |
44
|
|
|
|
|
|
|
)| |
45
|
|
|
|
|
|
|
5(?: |
46
|
|
|
|
|
|
|
5(?: |
47
|
|
|
|
|
|
|
3\\d| |
48
|
|
|
|
|
|
|
4[0-7] |
49
|
|
|
|
|
|
|
)| |
50
|
|
|
|
|
|
|
6[67]\\d| |
51
|
|
|
|
|
|
|
7(?: |
52
|
|
|
|
|
|
|
1[04]| |
53
|
|
|
|
|
|
|
2[035]| |
54
|
|
|
|
|
|
|
3[58]| |
55
|
|
|
|
|
|
|
48 |
56
|
|
|
|
|
|
|
) |
57
|
|
|
|
|
|
|
)| |
58
|
|
|
|
|
|
|
8\\d{3} |
59
|
|
|
|
|
|
|
)\\d{3} |
60
|
|
|
|
|
|
|
', |
61
|
|
|
|
|
|
|
'geographic' => ' |
62
|
|
|
|
|
|
|
(?: |
63
|
|
|
|
|
|
|
4(?: |
64
|
|
|
|
|
|
|
[23]\\d\\d| |
65
|
|
|
|
|
|
|
4(?: |
66
|
|
|
|
|
|
|
1[024679]| |
67
|
|
|
|
|
|
|
[6-9]\\d |
68
|
|
|
|
|
|
|
) |
69
|
|
|
|
|
|
|
)| |
70
|
|
|
|
|
|
|
5(?: |
71
|
|
|
|
|
|
|
5(?: |
72
|
|
|
|
|
|
|
3\\d| |
73
|
|
|
|
|
|
|
4[0-7] |
74
|
|
|
|
|
|
|
)| |
75
|
|
|
|
|
|
|
6[67]\\d| |
76
|
|
|
|
|
|
|
7(?: |
77
|
|
|
|
|
|
|
1[04]| |
78
|
|
|
|
|
|
|
2[035]| |
79
|
|
|
|
|
|
|
3[58]| |
80
|
|
|
|
|
|
|
48 |
81
|
|
|
|
|
|
|
) |
82
|
|
|
|
|
|
|
)| |
83
|
|
|
|
|
|
|
8\\d{3} |
84
|
|
|
|
|
|
|
)\\d{3} |
85
|
|
|
|
|
|
|
', |
86
|
|
|
|
|
|
|
'mobile' => ' |
87
|
|
|
|
|
|
|
(?: |
88
|
|
|
|
|
|
|
[23679]\\d| |
89
|
|
|
|
|
|
|
5[0-389] |
90
|
|
|
|
|
|
|
)\\d{5} |
91
|
|
|
|
|
|
|
', |
92
|
|
|
|
|
|
|
'pager' => '', |
93
|
|
|
|
|
|
|
'personal_number' => '', |
94
|
|
|
|
|
|
|
'specialrate' => '', |
95
|
|
|
|
|
|
|
'toll_free' => '', |
96
|
|
|
|
|
|
|
'voip' => '' |
97
|
|
|
|
|
|
|
}; |
98
|
|
|
|
|
|
|
my %areanames = (); |
99
|
|
|
|
|
|
|
$areanames{en} = {"2204486", "Gunjur", |
100
|
|
|
|
|
|
|
"2204480", "Bondali", |
101
|
|
|
|
|
|
|
"220574", "Kaur", |
102
|
|
|
|
|
|
|
"2204484", "Brikama\/Kanilia", |
103
|
|
|
|
|
|
|
"220567", "Sotuma", |
104
|
|
|
|
|
|
|
"2205678", "Brikama\-Ba", |
105
|
|
|
|
|
|
|
"2205546", "Kudang", |
106
|
|
|
|
|
|
|
"2205540", "Kaiaf", |
107
|
|
|
|
|
|
|
"2205725", "Iliasa", |
108
|
|
|
|
|
|
|
"2205544", "Bureng", |
109
|
|
|
|
|
|
|
"220553", "Soma", |
110
|
|
|
|
|
|
|
"2205542", "Nyorojattaba", |
111
|
|
|
|
|
|
|
"2205666", "Numeyel", |
112
|
|
|
|
|
|
|
"2205710", "Barra", |
113
|
|
|
|
|
|
|
"2205541", "Kwenella", |
114
|
|
|
|
|
|
|
"2204417", "Sanyang", |
115
|
|
|
|
|
|
|
"2205714", "Ndugukebbe", |
116
|
|
|
|
|
|
|
"220446", "Kotu\/Senegambia", |
117
|
|
|
|
|
|
|
"2204482", "Brikama\/Kanilia", |
118
|
|
|
|
|
|
|
"2204489", "Bwiam", |
119
|
|
|
|
|
|
|
"22043", "Bundung\/Serekunda", |
120
|
|
|
|
|
|
|
"2204481", "Brikama\/Kanilia", |
121
|
|
|
|
|
|
|
"22044195", "Berending", |
122
|
|
|
|
|
|
|
"2205723", "Njabakunda", |
123
|
|
|
|
|
|
|
"2204483", "Brikama\/Kanilia", |
124
|
|
|
|
|
|
|
"22042", "Banjul", |
125
|
|
|
|
|
|
|
"220447", "Yundum", |
126
|
|
|
|
|
|
|
"2205665", "Kuntaur", |
127
|
|
|
|
|
|
|
"2204488", "Sibanor", |
128
|
|
|
|
|
|
|
"2205543", "Japeneh\/Soma", |
129
|
|
|
|
|
|
|
"2205674", "Bansang", |
130
|
|
|
|
|
|
|
"2205735", "Farafenni", |
131
|
|
|
|
|
|
|
"220449", "Bakau", |
132
|
|
|
|
|
|
|
"2204414", "Sanyang", |
133
|
|
|
|
|
|
|
"2204416", "Tujereng", |
134
|
|
|
|
|
|
|
"2205676", "Georgetown", |
135
|
|
|
|
|
|
|
"2204410", "Brufut", |
136
|
|
|
|
|
|
|
"2205547", "Jareng", |
137
|
|
|
|
|
|
|
"220566", "Baja\ Kunda\/Basse\/Fatoto\/Gambisara\/Garawol\/Misera\/Sambakunda\/Sudowol", |
138
|
|
|
|
|
|
|
"2204485", "Kafuta", |
139
|
|
|
|
|
|
|
"2204412", "Tanji", |
140
|
|
|
|
|
|
|
"2204419", "Kartong", |
141
|
|
|
|
|
|
|
"2205738", "Ngensanjal", |
142
|
|
|
|
|
|
|
"2204487", "Faraba", |
143
|
|
|
|
|
|
|
"2205720", "Kerewan", |
144
|
|
|
|
|
|
|
"2205545", "Pakaliba",}; |
145
|
|
|
|
|
|
|
|
146
|
|
|
|
|
|
|
sub new { |
147
|
7
|
|
|
7
|
1
|
29
|
my $class = shift; |
148
|
7
|
|
|
|
|
12
|
my $number = shift; |
149
|
7
|
|
|
|
|
198
|
$number =~ s/(^\+220|\D)//g; |
150
|
7
|
|
|
|
|
43
|
my $self = bless({ country_code => '220', number => $number, formatters => $formatters, validators => $validators, areanames => \%areanames}, $class); |
151
|
7
|
100
|
|
|
|
39
|
return $self->is_valid() ? $self : undef; |
152
|
|
|
|
|
|
|
} |
153
|
|
|
|
|
|
|
1; |