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
|
|
1326
|
use base qw(Number::Phone::StubCountry); |
|
2
|
|
|
|
|
8
|
|
|
2
|
|
|
|
|
233
|
|
21
|
|
|
|
|
|
|
|
22
|
2
|
|
|
2
|
|
17
|
use strict; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
59
|
|
23
|
2
|
|
|
2
|
|
19
|
use warnings; |
|
2
|
|
|
|
|
13
|
|
|
2
|
|
|
|
|
58
|
|
24
|
2
|
|
|
2
|
|
14
|
use utf8; |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
14
|
|
25
|
|
|
|
|
|
|
our $VERSION = 1.20230903131447; |
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} = {"2204410", "Brufut", |
100
|
|
|
|
|
|
|
"2204487", "Faraba", |
101
|
|
|
|
|
|
|
"2205710", "Barra", |
102
|
|
|
|
|
|
|
"22044195", "Berending", |
103
|
|
|
|
|
|
|
"2204480", "Bondali", |
104
|
|
|
|
|
|
|
"2204417", "Sanyang", |
105
|
|
|
|
|
|
|
"2205542", "Nyorojattaba", |
106
|
|
|
|
|
|
|
"2205540", "Kaiaf", |
107
|
|
|
|
|
|
|
"22043", "Bundung\/Serekunda", |
108
|
|
|
|
|
|
|
"2204482", "Brikama\/Kanilia", |
109
|
|
|
|
|
|
|
"2205720", "Kerewan", |
110
|
|
|
|
|
|
|
"2204419", "Kartong", |
111
|
|
|
|
|
|
|
"2204489", "Bwiam", |
112
|
|
|
|
|
|
|
"2205547", "Jareng", |
113
|
|
|
|
|
|
|
"2204412", "Tanji", |
114
|
|
|
|
|
|
|
"220567", "Sotuma", |
115
|
|
|
|
|
|
|
"2204484", "Brikama\/Kanilia", |
116
|
|
|
|
|
|
|
"2205735", "Farafenni", |
117
|
|
|
|
|
|
|
"2205541", "Kwenella", |
118
|
|
|
|
|
|
|
"2204485", "Kafuta", |
119
|
|
|
|
|
|
|
"2204486", "Gunjur", |
120
|
|
|
|
|
|
|
"220553", "Soma", |
121
|
|
|
|
|
|
|
"2205665", "Kuntaur", |
122
|
|
|
|
|
|
|
"2205678", "Brikama\-Ba", |
123
|
|
|
|
|
|
|
"220447", "Yundum", |
124
|
|
|
|
|
|
|
"2204416", "Tujereng", |
125
|
|
|
|
|
|
|
"2205666", "Numeyel", |
126
|
|
|
|
|
|
|
"2205714", "Ndugukebbe", |
127
|
|
|
|
|
|
|
"2204414", "Sanyang", |
128
|
|
|
|
|
|
|
"2204483", "Brikama\/Kanilia", |
129
|
|
|
|
|
|
|
"22042", "Banjul", |
130
|
|
|
|
|
|
|
"220566", "Baja\ Kunda\/Basse\/Fatoto\/Gambisara\/Garawol\/Misera\/Sambakunda\/Sudowol", |
131
|
|
|
|
|
|
|
"2205723", "Njabakunda", |
132
|
|
|
|
|
|
|
"220574", "Kaur", |
133
|
|
|
|
|
|
|
"2205543", "Japeneh\/Soma", |
134
|
|
|
|
|
|
|
"2205738", "Ngensanjal", |
135
|
|
|
|
|
|
|
"2204488", "Sibanor", |
136
|
|
|
|
|
|
|
"2205545", "Pakaliba", |
137
|
|
|
|
|
|
|
"2205546", "Kudang", |
138
|
|
|
|
|
|
|
"220446", "Kotu\/Senegambia", |
139
|
|
|
|
|
|
|
"2205676", "Georgetown", |
140
|
|
|
|
|
|
|
"2205725", "Iliasa", |
141
|
|
|
|
|
|
|
"2205674", "Bansang", |
142
|
|
|
|
|
|
|
"2205544", "Bureng", |
143
|
|
|
|
|
|
|
"220449", "Bakau", |
144
|
|
|
|
|
|
|
"2204481", "Brikama\/Kanilia",}; |
145
|
|
|
|
|
|
|
|
146
|
|
|
|
|
|
|
sub new { |
147
|
7
|
|
|
7
|
1
|
24
|
my $class = shift; |
148
|
7
|
|
|
|
|
20
|
my $number = shift; |
149
|
7
|
|
|
|
|
59
|
$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
|
|
|
|
44
|
return $self->is_valid() ? $self : undef; |
152
|
|
|
|
|
|
|
} |
153
|
|
|
|
|
|
|
1; |