blib/lib/Number/Phone/StubCountry/GM.pm

filter: Statementstmt 100% 24 / 24 Branchbran 100% 2 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod 100% 1 / 1 totaltotal 100% 32 / 32 CC 2 SCAR 2.9
CC
2
Cov
100%
new
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.3
« blib/lib/Number/Phone/StubCountry/GL.pm ↑ Summary blib/lib/Number/Phone/StubCountry/GMSS.pm »
1 # automatically generated file, don't edit
2  
3  
4  
5 # Copyright 2026 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 ▶use base qw(Number::Phone::StubCountry);
Subroutine BEGIN: called CC=1 SCAR=0.0
21  
22 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
23 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
24 2 ▶use utf8;
Subroutine BEGIN: called CC=1 SCAR=0.0
25 2 our $VERSION = 1.20260904101550;
26  
27 2 my $formatters = [
28 {
29 'format' => '$1 $2',
30 'leading_digits' => '
31 [235-9]|
32 4(?:
33 [0-35]|
34 4[16-9]
35 )
36 ',
37 'pattern' => '(\\d{3})(\\d{4})'
38 },
39 {
40 'format' => '$1 $2 $3',
41 'leading_digits' => '[48]',
42 'pattern' => '(\\d{2})(\\d{3})(\\d{4})'
43 }
44 ];
45  
46 2 my $validators = {
47 'fixed_line' => '
48 (?:
49 4(?:
50 [23]\\d\\d|
51 4(?:
52 1[024679]|
53 (?:
54 4(?:
55 [237-9]\\d|
56 4[14-9]
57 )|
58 8[0-389]\\d
59 )\\d|
60 5(?:
61 5(?:
62 3\\d|
63 4[0-7]
64 )|
65 [67]\\d\\d
66 )
67 )
68 )|
69 5(?:
70 5(?:
71 3\\d|
72 4[0-7]
73 )|
74 6[67]\\d|
75 7(?:
76 1[04]|
77 2[035]|
78 3[58]|
79 48
80 )
81 )|
82 8[0-389]\\d\\d
83 )\\d{3}|
84 44[6-9]\\d{4}
85 ',
86 'geographic' => '
87 (?:
88 4(?:
89 [23]\\d\\d|
90 4(?:
91 1[024679]|
92 (?:
93 4(?:
94 [237-9]\\d|
95 4[14-9]
96 )|
97 8[0-389]\\d
98 )\\d|
99 5(?:
100 5(?:
101 3\\d|
102 4[0-7]
103 )|
104 [67]\\d\\d
105 )
106 )
107 )|
108 5(?:
109 5(?:
110 3\\d|
111 4[0-7]
112 )|
113 6[67]\\d|
114 7(?:
115 1[04]|
116 2[035]|
117 3[58]|
118 48
119 )
120 )|
121 8[0-389]\\d\\d
122 )\\d{3}|
123 44[6-9]\\d{4}
124 ',
125 'mobile' => '
126 (?:
127 (?:
128 [23679]\\d|
129 4[015]|
130 8(?:
131 (?:
132 3[35]|
133 6[68]|
134 99
135 )\\d|
136 7(?:
137 [27]\\d|
138 4[015]
139 )
140 )
141 )\\d|
142 5(?:
143 [0-489]\\d|
144 56
145 )
146 )\\d{4}|
147 8[4-7]\\d{5}
148 ',
149 'pager' => '',
150 'personal_number' => '',
151 'specialrate' => '',
152 'toll_free' => '',
153 'voip' => ''
154 };
155 2 my %areanames = ();
156 2 $areanames{en} = {"2204442", "Banjul",
157 "220445546", "Kudang",
158 "2204414", "Sanyang",
159 "220444481", "Brikama\/Kanilia",
160 "2205714", "Ndugukebbe",
161 "2205545", "Pakaliba",
162 "220445542", "Nyorojattaba",
163 "220444489", "Bwiam",
164 "22044441", "Brufut\/Kartong\/Sanyang\/Tanji\/Berending",
165 "2204443", "Serekunda",
166 "2205678", "Brikama\-Ba",
167 "2205674", "Bansang",
168 "2205544", "Bureng",
169 "22043", "Bundung\/Serekunda",
170 "22042", "Banjul",
171 "2204419", "Kartong",
172 "22044445", "Soma",
173 "220444488", "Sibanor",
174 "220445547", "Jareng",
175 "2204485", "Kafuta",
176 "220445543", "Japeneh\/Soma",
177 "2205725", "Iliasa",
178 "2204447", "Yundum",
179 "2205665", "Kuntaur",
180 "2204489", "Bwiam",
181 "220445545", "Pakaliba",
182 "220445544", "Bureng",
183 "220444480", "Bondali",
184 "220574", "Kaur",
185 "2204484", "Brikama\/Kanilia",
186 "2204488", "Sibanor",
187 "22044447", "Yundum",
188 "2204416", "Tujereng",
189 "2205541", "Kwenella",
190 "220444482", "Brikama\/Kanilia",
191 "2204457", "Kerewan\/Farafenni\/Barra\/Kaur",
192 "22044449", "Bakau",
193 "220445541", "Kwenella",
194 "2205547", "Jareng",
195 "2204482", "Brikama\/Kanilia",
196 "220449", "Bakau",
197 "220444486", "Gunjur",
198 "2204480", "Bondali",
199 "2205738", "Ngensanjal",
200 "2205720", "Kerewan",
201 "2204456", "Basse\/Bansang\/Gambisara\/Janjanbury\/Kuntaur",
202 "220446", "Kotu\/Senegambia",
203 "22044444", "Pakaliba\/Kaiaf\/Jeren\/Kudang\/Bureng\/Japineh\/Kwenela\/Nyorojataba",
204 "2204417", "Sanyang",
205 "220567", "Sotuma",
206 "2205723", "Njabakunda",
207 "2204483", "Brikama\/Kanilia",
208 "2205546", "Kudang",
209 "22044553", "Soma",
210 "2205676", "Georgetown",
211 "2205735", "Farafenni",
212 "2204449", "Bakau",
213 "2205542", "Nyorojattaba",
214 "2205540", "Kaiaf",
215 "220444485", "Kafuta",
216 "220553", "Soma",
217 "2204487", "Faraba",
218 "2204481", "Brikama\/Kanilia",
219 "220444487", "Faraba",
220 "220444483", "Brikama\/Kanilia",
221 "2204486", "Gunjur",
222 "2205710", "Barra",
223 "22044446", "Kotu\/Kololi",
224 "220447", "Yundum",
225 "2205543", "Japeneh\/Soma",
226 "2204448", "Brikama\/Gunjur\/Sanyang\/Bwiam\/Kanilai",
227 "2205666", "Numeyel",
228 "22044195", "Berending",
229 "220566", "Baja\ Kunda\/Basse\/Fatoto\/Gambisara\/Garawol\/Misera\/Sambakunda\/Sudowol",
230 "220445540", "Kaiaf",
231 "2204410", "Brufut",
232 "220444484", "Brikama\/Kanilia",
233 "2204412", "Tanji",};
234 2 my $timezones = {
235 '' => [
236 'Africa/Banjul'
237 ]
238 };
239  
240 7 ▶ sub new {
Subroutine new: called CC=2 SCAR=6.9
Pod documented
241 7 my $class = shift;
242 7 my $number = shift;
243 7 $number =~ s/(^\+220|\D)//g;
244 7 my $self = bless({ country_code => '220', number => $number, formatters => $formatters, validators => $validators, timezones => $timezones, areanames => \%areanames}, $class);
245 7 ▶ return $self->is_valid() ? $self : undef;
Branch: 1 branch
BranchTrueFalseTotal
$self->is_valid ? : 6 1 7
246 }
247 2 1;
« blib/lib/Number/Phone/StubCountry/GL.pm ↑ Summary blib/lib/Number/Phone/StubCountry/GMSS.pm »