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

filter: Statementstmt 100% 27 / 27 Branchbran 75.0% 3 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod 100% 1 / 1 totaltotal 97.3% 36 / 37 CC 3 SCAR 6.2
CC
3
Cov
97%
new
3.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.9
« blib/lib/Number/Phone/StubCountry/KE.pm ↑ Summary blib/lib/Number/Phone/StubCountry/KI.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::KG;
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 3(?:
32 1[346]|
33 [24-79]
34 )
35 ',
36 'national_rule' => '0$1',
37 'pattern' => '(\\d{4})(\\d{5})'
38 },
39 {
40 'format' => '$1 $2 $3',
41 'leading_digits' => '
42 [235-79]|
43 88
44 ',
45 'national_rule' => '0$1',
46 'pattern' => '(\\d{3})(\\d{3})(\\d{3})'
47 },
48 {
49 'format' => '$1 $2 $3 $4',
50 'leading_digits' => '8',
51 'national_rule' => '0$1',
52 'pattern' => '(\\d{3})(\\d{3})(\\d)(\\d{2,3})'
53 }
54 ];
55  
56 2 my $validators = {
57 'fixed_line' => '
58 312(?:
59 5[0-79]\\d|
60 9(?:
61 [0-689]\\d|
62 7[0-24-9]
63 )
64 )\\d{3}|
65 (?:
66 3(?:
67 1(?:
68 2[0-46-8]|
69 3[1-9]|
70 47|
71 [56]\\d
72 )|
73 2(?:
74 22|
75 3[0-479]|
76 6[0-7]
77 )|
78 4(?:
79 22|
80 5[6-9]|
81 6\\d
82 )|
83 5(?:
84 22|
85 3[4-7]|
86 59|
87 6\\d
88 )|
89 6(?:
90 22|
91 5[35-7]|
92 6\\d
93 )|
94 7(?:
95 22|
96 3[468]|
97 4[1-9]|
98 59|
99 [67]\\d
100 )|
101 9(?:
102 22|
103 4[1-8]|
104 6\\d
105 )
106 )|
107 6(?:
108 09|
109 12|
110 2[2-4]
111 )\\d
112 )\\d{5}
113 ',
114 'geographic' => '
115 312(?:
116 5[0-79]\\d|
117 9(?:
118 [0-689]\\d|
119 7[0-24-9]
120 )
121 )\\d{3}|
122 (?:
123 3(?:
124 1(?:
125 2[0-46-8]|
126 3[1-9]|
127 47|
128 [56]\\d
129 )|
130 2(?:
131 22|
132 3[0-479]|
133 6[0-7]
134 )|
135 4(?:
136 22|
137 5[6-9]|
138 6\\d
139 )|
140 5(?:
141 22|
142 3[4-7]|
143 59|
144 6\\d
145 )|
146 6(?:
147 22|
148 5[35-7]|
149 6\\d
150 )|
151 7(?:
152 22|
153 3[468]|
154 4[1-9]|
155 59|
156 [67]\\d
157 )|
158 9(?:
159 22|
160 4[1-8]|
161 6\\d
162 )
163 )|
164 6(?:
165 09|
166 12|
167 2[2-4]
168 )\\d
169 )\\d{5}
170 ',
171 'mobile' => '
172 312(?:
173 58\\d|
174 973
175 )\\d{3}|
176 (?:
177 2(?:
178 0[0-35]|
179 2\\d
180 )|
181 5[0-24-7]\\d|
182 600|
183 7(?:
184 [07]\\d|
185 55
186 )|
187 88[08]|
188 9(?:
189 12|
190 9[05-9]
191 )
192 )\\d{6}
193 ',
194 'pager' => '',
195 'personal_number' => '',
196 'specialrate' => '',
197 'toll_free' => '800\\d{6,7}',
198 'voip' => ''
199 };
200 2 my %areanames = ();
201 2 $areanames{en} = {"99631254", "Bishkek\,\ Chuy\ region",
202 "996312971", "Bishkek\,\ Chuy\ region",
203 "9963736", "Bazarkorgon\,\ Jalal\-Abat\ region",
204 "9963456", "Kyzyl\-Adyr\,\ Talas\ region",
205 "996352", "Naryn",
206 "99631299", "Bishkek\,\ Chuy\ region",
207 "9963131", "Belovodskoe\,\ Chuy\ region",
208 "99631250", "Bishkek\,\ Chuy\ region",
209 "9963747", "Toktogul\,\ Jalal\-Abat\ region",
210 "996342", "Talas",
211 "996322", "Osh",
212 "9963133", "Kara\-Balta\,\ Chuy\ region",
213 "99631296", "Bishkek\,\ Chuy\ region",
214 "9963535", "Kochkor\,\ Naryn\ region",
215 "9963947", "Bokombaevo\/Kadji\-Say\,\ Issyk\-Ko\ region",
216 "9963128", "Bishkek\,\ Chuy\ region",
217 "99631298", "Bishkek\,\ Chuy\ region",
218 "9963124", "Bishkek\,\ Chuy\ region",
219 "9963132", "Kant\,\ Chuy\ region",
220 "9963138", "Tokmok\,\ Chuy\ region",
221 "99631251", "Bishkek\,\ Chuy\ region",
222 "9963134", "Sokuluk\,\ Chuy\ region",
223 "9963122", "Bishkek\,\ Chuy\ region",
224 "9963120", "Bishkek\,\ Chuy\ region",
225 "9963237", "Daroot\-Korgon\,\ Osh\ region",
226 "9963458", "Kokoy\,\ Talas\ region",
227 "99631255", "Bishkek\,\ Chuy\ region",
228 "9963734", "Massy\/Kochkor\-Ata\,\ Jalal\-Abat\ region",
229 "9963738", "Kazarman\,\ Jalal\-Abat\ region",
230 "9963459", "Pokrovka\,\ Talas\ region",
231 "9963123", "Bishkek\,\ Chuy\ region",
232 "9963653", "Sulukta\,\ Naryn\ region",
233 "996362", "Batken\,\ Naryn\ region",
234 "9963139", "Lebedinovka\,\ Chuy\ region",
235 "99631257", "Bishkek\,\ Chuy\ region",
236 "996312977", "Bishkek\,\ Chuy\ region",
237 "9963745", "Tash\-Kumyr\,\ Jalal\-Abat\ region",
238 "9963121", "Bishkek\,\ Chuy\ region",
239 "9963537", "Baetov\,\ Naryn\ region",
240 "996312974", "Bishkek\,\ Chuy\ region",
241 "99631252", "Bishkek\,\ Chuy\ region",
242 "9963945", "Tup\,\ Issyk\-Ko\ region",
243 "99631293", "Bishkek\,\ Chuy\ region",
244 "9963656", "Isfana\,\ Naryn\ region",
245 "9963126", "Bishkek\,\ Chuy\ region",
246 "9963239", "Kara\-Kulja\,\ Osh\ region",
247 "9963943", "Cholpon\-Ata\,\ Issyk\-Ko\ region",
248 "99631294", "Bishkek\,\ Chuy\ region",
249 "9963742", "Kerben\,\ Jalal\-Abat\ region",
250 "9963234", "Gulcha\,\ Osh\ region",
251 "996312978", "Bishkek\,\ Chuy\ region",
252 "9963137", "Kayndy\,\ Chuy\ region",
253 "99631259", "Bishkek\,\ Chuy\ region",
254 "9963457", "Bakay\-Ata\,\ Talas\ region",
255 "996312979", "Bishkek\,\ Chuy\ region",
256 "9963942", "Ananyevo\,\ Issyk\-Ko\ region",
257 "9963946", "Kyzyl\-Suu\,\ Issyk\-Ko\ region",
258 "9963534", "At\-Bashy\,\ Naryn\ region",
259 "99631256", "Bishkek\,\ Chuy\ region",
260 "9963655", "Pulgon\,\ Naryn\ region",
261 "9963741", "Ala\-Buka\,\ Jalal\-Abat\ region",
262 "99631290", "Bishkek\,\ Chuy\ region",
263 "9963746", "Kara\-Kul\,\ Jalal\-Abat\ region",
264 "996312970", "Bishkek\,\ Chuy\ region",
265 "996312976", "Bishkek\,\ Chuy\ region",
266 "99631295", "Bishkek\,\ Chuy\ region",
267 "99631291", "Bishkek\,\ Chuy\ region",
268 "996312972", "Bishkek\,\ Chuy\ region",
269 "9963231", "Aravan\,\ Osh\ region",
270 "9963135", "Kemin\,\ Chuy\ region",
271 "9963944", "Balykchy\,\ Issyk\-Ko\ region",
272 "9963536", "Chaek\/Minkush\,\ Naryn\ region",
273 "9963948", "Ak\-Suu\,\ Issyk\-Ko\ region",
274 "996392", "Karakol\,\ Issyk\-Ko\ region",
275 "9963232", "Kara\-Suu\,\ Osh\ region",
276 "9963657", "Kyzylkia\,\ Naryn\ region",
277 "9963127", "Bishkek\,\ Chuy\ region",
278 "9963230", "Eski\-Nookat\,\ Osh\ region",
279 "9963749", "Kanysh\-Kya\ \(Chatkal\)\,\ Jalal\-Abat\ region",
280 "996312975", "Bishkek\,\ Chuy\ region",
281 "99631253", "Bishkek\,\ Chuy\ region",
282 "9963748", "Kok\-Jangak\/Suzak\,\ Jalal\-Abat\ region",
283 "996372", "Jalal\-Abat",
284 "9963744", "Mailuu\-Suu\,\ Jalal\-Abat\ region",
285 "99631292", "Bishkek\,\ Chuy\ region",
286 "9963233", "Uzgen\,\ Osh\ region",};
287 2 my $timezones = {
288 '' => [
289 'Asia/Bishkek'
290 ]
291 };
292  
293 10 ▶ sub new {
Subroutine new: called CC=3 SCAR=11.0
Pod documented
294 10 my $class = shift;
295 10 my $number = shift;
296 10 $number =~ s/(^\+996|\D)//g;
297 10 my $self = bless({ country_code => '996', number => $number, formatters => $formatters, validators => $validators, timezones => $timezones, areanames => \%areanames}, $class);
298 10 ▶ return $self if ($self->is_valid());
Branch: 1 branch
BranchTrueFalseTotal
if $self->is_valid 9 1 10
299 1 $number =~ s/^(?:0)//;
300 1 $self = bless({ country_code => '996', number => $number, formatters => $formatters, validators => $validators, areanames => \%areanames}, $class);
301 1 ▶ return $self->is_valid() ? $self : undef;
Branch: 1 branch
BranchTrueFalseTotal
$self->is_valid ? : 0 1 1
302 }
303 2 1;
« blib/lib/Number/Phone/StubCountry/KE.pm ↑ Summary blib/lib/Number/Phone/StubCountry/KI.pm »