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
|
|
1206
|
use base qw(Number::Phone::StubCountry); |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
251
|
|
21
|
|
|
|
|
|
|
|
22
|
2
|
|
|
2
|
|
18
|
use strict; |
|
2
|
|
|
|
|
8
|
|
|
2
|
|
|
|
|
53
|
|
23
|
2
|
|
|
2
|
|
13
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
78
|
|
24
|
2
|
|
|
2
|
|
12
|
use utf8; |
|
2
|
|
|
|
|
13
|
|
|
2
|
|
|
|
|
17
|
|
25
|
|
|
|
|
|
|
our $VERSION = 1.20230614174403; |
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-489] |
90
|
|
|
|
|
|
|
)\\d{5} |
91
|
|
|
|
|
|
|
', |
92
|
|
|
|
|
|
|
'pager' => '', |
93
|
|
|
|
|
|
|
'personal_number' => '', |
94
|
|
|
|
|
|
|
'specialrate' => '', |
95
|
|
|
|
|
|
|
'toll_free' => '', |
96
|
|
|
|
|
|
|
'voip' => '' |
97
|
|
|
|
|
|
|
}; |
98
|
|
|
|
|
|
|
my %areanames = (); |
99
|
|
|
|
|
|
|
$areanames{en} = {"220449", "Bakau", |
100
|
|
|
|
|
|
|
"2204410", "Brufut", |
101
|
|
|
|
|
|
|
"220566", "Baja\ Kunda\/Basse\/Fatoto\/Gambisara\/Garawol\/Misera\/Sambakunda\/Sudowol", |
102
|
|
|
|
|
|
|
"2205735", "Farafenni", |
103
|
|
|
|
|
|
|
"2205665", "Kuntaur", |
104
|
|
|
|
|
|
|
"2205544", "Bureng", |
105
|
|
|
|
|
|
|
"2204487", "Faraba", |
106
|
|
|
|
|
|
|
"2205678", "Brikama\-Ba", |
107
|
|
|
|
|
|
|
"2205674", "Bansang", |
108
|
|
|
|
|
|
|
"220447", "Yundum", |
109
|
|
|
|
|
|
|
"2204486", "Gunjur", |
110
|
|
|
|
|
|
|
"2204480", "Bondali", |
111
|
|
|
|
|
|
|
"2204417", "Sanyang", |
112
|
|
|
|
|
|
|
"2205541", "Kwenella", |
113
|
|
|
|
|
|
|
"2205666", "Numeyel", |
114
|
|
|
|
|
|
|
"2205542", "Nyorojattaba", |
115
|
|
|
|
|
|
|
"22043", "Bundung\/Serekunda", |
116
|
|
|
|
|
|
|
"220553", "Soma", |
117
|
|
|
|
|
|
|
"2205714", "Ndugukebbe", |
118
|
|
|
|
|
|
|
"2204483", "Brikama\/Kanilia", |
119
|
|
|
|
|
|
|
"2204485", "Kafuta", |
120
|
|
|
|
|
|
|
"2204416", "Tujereng", |
121
|
|
|
|
|
|
|
"2204412", "Tanji", |
122
|
|
|
|
|
|
|
"2204488", "Sibanor", |
123
|
|
|
|
|
|
|
"2204484", "Brikama\/Kanilia", |
124
|
|
|
|
|
|
|
"2205547", "Jareng", |
125
|
|
|
|
|
|
|
"2205725", "Iliasa", |
126
|
|
|
|
|
|
|
"2204489", "Bwiam", |
127
|
|
|
|
|
|
|
"2205723", "Njabakunda", |
128
|
|
|
|
|
|
|
"2205676", "Georgetown", |
129
|
|
|
|
|
|
|
"2205546", "Kudang", |
130
|
|
|
|
|
|
|
"220574", "Kaur", |
131
|
|
|
|
|
|
|
"22044195", "Berending", |
132
|
|
|
|
|
|
|
"2205710", "Barra", |
133
|
|
|
|
|
|
|
"2205720", "Kerewan", |
134
|
|
|
|
|
|
|
"2204419", "Kartong", |
135
|
|
|
|
|
|
|
"2204414", "Sanyang", |
136
|
|
|
|
|
|
|
"2204482", "Brikama\/Kanilia", |
137
|
|
|
|
|
|
|
"2204481", "Brikama\/Kanilia", |
138
|
|
|
|
|
|
|
"2205540", "Kaiaf", |
139
|
|
|
|
|
|
|
"220567", "Sotuma", |
140
|
|
|
|
|
|
|
"2205738", "Ngensanjal", |
141
|
|
|
|
|
|
|
"220446", "Kotu\/Senegambia", |
142
|
|
|
|
|
|
|
"2205543", "Japeneh\/Soma", |
143
|
|
|
|
|
|
|
"2205545", "Pakaliba", |
144
|
|
|
|
|
|
|
"22042", "Banjul",}; |
145
|
|
|
|
|
|
|
|
146
|
|
|
|
|
|
|
sub new { |
147
|
7
|
|
|
7
|
1
|
17
|
my $class = shift; |
148
|
7
|
|
|
|
|
11
|
my $number = shift; |
149
|
7
|
|
|
|
|
44
|
$number =~ s/(^\+220|\D)//g; |
150
|
7
|
|
|
|
|
49
|
my $self = bless({ country_code => '220', number => $number, formatters => $formatters, validators => $validators, areanames => \%areanames}, $class); |
151
|
7
|
100
|
|
|
|
41
|
return $self->is_valid() ? $self : undef; |
152
|
|
|
|
|
|
|
} |
153
|
|
|
|
|
|
|
1; |