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::CO; |
20
|
2
|
|
|
2
|
|
1393
|
use base qw(Number::Phone::StubCountry); |
|
2
|
|
|
|
|
8
|
|
|
2
|
|
|
|
|
284
|
|
21
|
|
|
|
|
|
|
|
22
|
2
|
|
|
2
|
|
20
|
use strict; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
101
|
|
23
|
2
|
|
|
2
|
|
15
|
use warnings; |
|
2
|
|
|
|
|
8
|
|
|
2
|
|
|
|
|
61
|
|
24
|
2
|
|
|
2
|
|
14
|
use utf8; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
16
|
|
25
|
|
|
|
|
|
|
our $VERSION = 1.20230307181419; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
my $formatters = [ |
28
|
|
|
|
|
|
|
{ |
29
|
|
|
|
|
|
|
'format' => '$1 $2', |
30
|
|
|
|
|
|
|
'leading_digits' => '6', |
31
|
|
|
|
|
|
|
'national_rule' => '($1)', |
32
|
|
|
|
|
|
|
'pattern' => '(\\d{3})(\\d{7})' |
33
|
|
|
|
|
|
|
}, |
34
|
|
|
|
|
|
|
{ |
35
|
|
|
|
|
|
|
'format' => '$1 $2', |
36
|
|
|
|
|
|
|
'leading_digits' => ' |
37
|
|
|
|
|
|
|
3[0-357]| |
38
|
|
|
|
|
|
|
91 |
39
|
|
|
|
|
|
|
', |
40
|
|
|
|
|
|
|
'pattern' => '(\\d{3})(\\d{7})' |
41
|
|
|
|
|
|
|
}, |
42
|
|
|
|
|
|
|
{ |
43
|
|
|
|
|
|
|
'format' => '$1-$2-$3', |
44
|
|
|
|
|
|
|
'intl_format' => '$1 $2 $3', |
45
|
|
|
|
|
|
|
'leading_digits' => '1', |
46
|
|
|
|
|
|
|
'national_rule' => '0$1', |
47
|
|
|
|
|
|
|
'pattern' => '(\\d)(\\d{3})(\\d{7})' |
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
]; |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
my $validators = { |
52
|
|
|
|
|
|
|
'fixed_line' => ' |
53
|
|
|
|
|
|
|
601055(?: |
54
|
|
|
|
|
|
|
[0-4]\\d| |
55
|
|
|
|
|
|
|
50 |
56
|
|
|
|
|
|
|
)\\d\\d| |
57
|
|
|
|
|
|
|
6010(?: |
58
|
|
|
|
|
|
|
[0-4]\\d| |
59
|
|
|
|
|
|
|
5[0-4] |
60
|
|
|
|
|
|
|
)\\d{4}| |
61
|
|
|
|
|
|
|
60[124-8][2-9]\\d{6} |
62
|
|
|
|
|
|
|
', |
63
|
|
|
|
|
|
|
'geographic' => ' |
64
|
|
|
|
|
|
|
601055(?: |
65
|
|
|
|
|
|
|
[0-4]\\d| |
66
|
|
|
|
|
|
|
50 |
67
|
|
|
|
|
|
|
)\\d\\d| |
68
|
|
|
|
|
|
|
6010(?: |
69
|
|
|
|
|
|
|
[0-4]\\d| |
70
|
|
|
|
|
|
|
5[0-4] |
71
|
|
|
|
|
|
|
)\\d{4}| |
72
|
|
|
|
|
|
|
60[124-8][2-9]\\d{6} |
73
|
|
|
|
|
|
|
', |
74
|
|
|
|
|
|
|
'mobile' => ' |
75
|
|
|
|
|
|
|
3333(?: |
76
|
|
|
|
|
|
|
0(?: |
77
|
|
|
|
|
|
|
0\\d| |
78
|
|
|
|
|
|
|
1[0-5] |
79
|
|
|
|
|
|
|
)| |
80
|
|
|
|
|
|
|
[4-9]\\d\\d |
81
|
|
|
|
|
|
|
)\\d{3}| |
82
|
|
|
|
|
|
|
(?: |
83
|
|
|
|
|
|
|
3(?: |
84
|
|
|
|
|
|
|
24[1-9]| |
85
|
|
|
|
|
|
|
3(?: |
86
|
|
|
|
|
|
|
00| |
87
|
|
|
|
|
|
|
3[0-24-9] |
88
|
|
|
|
|
|
|
) |
89
|
|
|
|
|
|
|
)| |
90
|
|
|
|
|
|
|
9101 |
91
|
|
|
|
|
|
|
)\\d{6}| |
92
|
|
|
|
|
|
|
3(?: |
93
|
|
|
|
|
|
|
0[0-5]| |
94
|
|
|
|
|
|
|
1\\d| |
95
|
|
|
|
|
|
|
2[0-3]| |
96
|
|
|
|
|
|
|
5[01]| |
97
|
|
|
|
|
|
|
70 |
98
|
|
|
|
|
|
|
)\\d{7} |
99
|
|
|
|
|
|
|
', |
100
|
|
|
|
|
|
|
'pager' => '', |
101
|
|
|
|
|
|
|
'personal_number' => '', |
102
|
|
|
|
|
|
|
'specialrate' => '( |
103
|
|
|
|
|
|
|
19(?: |
104
|
|
|
|
|
|
|
0[01]| |
105
|
|
|
|
|
|
|
4[78] |
106
|
|
|
|
|
|
|
)\\d{7} |
107
|
|
|
|
|
|
|
)', |
108
|
|
|
|
|
|
|
'toll_free' => '1800\\d{7}', |
109
|
|
|
|
|
|
|
'voip' => '' |
110
|
|
|
|
|
|
|
}; |
111
|
|
|
|
|
|
|
my %areanames = (); |
112
|
|
|
|
|
|
|
$areanames{en} = {"5760292", "Cali", |
113
|
|
|
|
|
|
|
"576018435", "Cartagenita", |
114
|
|
|
|
|
|
|
"576018419", "Pandi", |
115
|
|
|
|
|
|
|
"5760768", "Bucaramanga", |
116
|
|
|
|
|
|
|
"576018257", "Funza", |
117
|
|
|
|
|
|
|
"576018449", "La\ Peña", |
118
|
|
|
|
|
|
|
"576018440", "Facatativa", |
119
|
|
|
|
|
|
|
"576018441", "Viani", |
120
|
|
|
|
|
|
|
"5760638", "Eje\ Cafetero", |
121
|
|
|
|
|
|
|
"57601842", "Facatativa", |
122
|
|
|
|
|
|
|
"576018434", "Cartagenita", |
123
|
|
|
|
|
|
|
"5760557", "Valledupar", |
124
|
|
|
|
|
|
|
"576018383", "Nilo", |
125
|
|
|
|
|
|
|
"57601820", "Madrid", |
126
|
|
|
|
|
|
|
"576018442", "Cachipay", |
127
|
|
|
|
|
|
|
"5760492", "Medellín", |
128
|
|
|
|
|
|
|
"576018256", "Madrid", |
129
|
|
|
|
|
|
|
"576018243", "Bojaca", |
130
|
|
|
|
|
|
|
"576018375", "Nariño", |
131
|
|
|
|
|
|
|
"5760534", "Barranquilla", |
132
|
|
|
|
|
|
|
"576048726", "Medellín", |
133
|
|
|
|
|
|
|
"5760790", "Bucaramanga", |
134
|
|
|
|
|
|
|
"57604911", "Medellín", |
135
|
|
|
|
|
|
|
"57601831", "Girardot", |
136
|
|
|
|
|
|
|
"576015", "Bogotá", |
137
|
|
|
|
|
|
|
"576018412", "Santa\ Inés", |
138
|
|
|
|
|
|
|
"5760536", "Barranquilla", |
139
|
|
|
|
|
|
|
"57604917", "Medellín", |
140
|
|
|
|
|
|
|
"576018393", "Girardot", |
141
|
|
|
|
|
|
|
"576042", "Medellín", |
142
|
|
|
|
|
|
|
"5760535", "Barranquilla", |
143
|
|
|
|
|
|
|
"576018386", "Apulo", |
144
|
|
|
|
|
|
|
"5760757", "Cucuta", |
145
|
|
|
|
|
|
|
"576018397", "Apulo", |
146
|
|
|
|
|
|
|
"57604913", "Medellín", |
147
|
|
|
|
|
|
|
"576018247", "La\ Punta", |
148
|
|
|
|
|
|
|
"57601833", "Girardot", |
149
|
|
|
|
|
|
|
"576018450", "San\ Antonio\ de\ Tequendama", |
150
|
|
|
|
|
|
|
"576018451", "Nocaima", |
151
|
|
|
|
|
|
|
"5760568", "Cartagena", |
152
|
|
|
|
|
|
|
"57601832", "Girardot", |
153
|
|
|
|
|
|
|
"5760537", "Barranquilla", |
154
|
|
|
|
|
|
|
"5760232", "Cali", |
155
|
|
|
|
|
|
|
"576056295", "Cartagena", |
156
|
|
|
|
|
|
|
"576018371", "Guataqui", |
157
|
|
|
|
|
|
|
"576018370", "Jerusalén", |
158
|
|
|
|
|
|
|
"576010", "Cundinamarca", |
159
|
|
|
|
|
|
|
"576018444", "Villeta", |
160
|
|
|
|
|
|
|
"576013", "Bogotá", |
161
|
|
|
|
|
|
|
"5760632", "Pereira", |
162
|
|
|
|
|
|
|
"576018438", "Facatativa", |
163
|
|
|
|
|
|
|
"576018403", "Choachi", |
164
|
|
|
|
|
|
|
"576018288", "Madrid", |
165
|
|
|
|
|
|
|
"5760273", "Pasto", |
166
|
|
|
|
|
|
|
"5760533", "Barranquilla", |
167
|
|
|
|
|
|
|
"5760687", "Manizales", |
168
|
|
|
|
|
|
|
"576018445", "Villeta", |
169
|
|
|
|
|
|
|
"576018246", "Puente\ Piedra", |
170
|
|
|
|
|
|
|
"576048723", "Medellín", |
171
|
|
|
|
|
|
|
"576018431", "Facatativa", |
172
|
|
|
|
|
|
|
"576018430", "Facatativa", |
173
|
|
|
|
|
|
|
"576018289", "Madrid", |
174
|
|
|
|
|
|
|
"576044", "Medellín", |
175
|
|
|
|
|
|
|
"576018439", "Facatativa", |
176
|
|
|
|
|
|
|
"576018253", "Madrid", |
177
|
|
|
|
|
|
|
"576048724", "Medellín", |
178
|
|
|
|
|
|
|
"5760763", "Bucaramanga", |
179
|
|
|
|
|
|
|
"576018392", "Nilo\/La\ Esmeralda", |
180
|
|
|
|
|
|
|
"576048511", "Medellín", |
181
|
|
|
|
|
|
|
"576048510", "Medellín", |
182
|
|
|
|
|
|
|
"5760235", "Cali", |
183
|
|
|
|
|
|
|
"576043", "Medellín", |
184
|
|
|
|
|
|
|
"576018254", "Madrid", |
185
|
|
|
|
|
|
|
"576018381", "Agua\ de\ Dios", |
186
|
|
|
|
|
|
|
"5760887", "Neiva", |
187
|
|
|
|
|
|
|
"5760566", "Cartagena", |
188
|
|
|
|
|
|
|
"576018376", "Tocaima", |
189
|
|
|
|
|
|
|
"576048725", "Medellín", |
190
|
|
|
|
|
|
|
"576018404", "Fomeque", |
191
|
|
|
|
|
|
|
"5760827", "Ibague", |
192
|
|
|
|
|
|
|
"576018255", "Madrid", |
193
|
|
|
|
|
|
|
"5760633", "Pereira", |
194
|
|
|
|
|
|
|
"5760866", "Villavicencio", |
195
|
|
|
|
|
|
|
"5760272", "Pasto", |
196
|
|
|
|
|
|
|
"576018242", "La\ Pradera\/Subachoque\/Subachique", |
197
|
|
|
|
|
|
|
"576018437", "Facatativa", |
198
|
|
|
|
|
|
|
"5760532", "Barranquilla", |
199
|
|
|
|
|
|
|
"576018443", "Cachipay", |
200
|
|
|
|
|
|
|
"5760289", "Cali", |
201
|
|
|
|
|
|
|
"576014", "Bogotá", |
202
|
|
|
|
|
|
|
"576012", "Bogotá", |
203
|
|
|
|
|
|
|
"576017", "Bogotá", |
204
|
|
|
|
|
|
|
"5760689", "Manizales", |
205
|
|
|
|
|
|
|
"5760637", "Eje\ Cafetero", |
206
|
|
|
|
|
|
|
"5760765", "Bucaramanga", |
207
|
|
|
|
|
|
|
"57601822", "Funza", |
208
|
|
|
|
|
|
|
"5760233", "Cali", |
209
|
|
|
|
|
|
|
"5760767", "Bucaramanga", |
210
|
|
|
|
|
|
|
"576018249", "Zipacon", |
211
|
|
|
|
|
|
|
"5760635", "Pereira", |
212
|
|
|
|
|
|
|
"5760290", "Cali", |
213
|
|
|
|
|
|
|
"576018241", "El\ Rosal", |
214
|
|
|
|
|
|
|
"576018240", "El\ Rosal", |
215
|
|
|
|
|
|
|
"576018436", "Facatativa", |
216
|
|
|
|
|
|
|
"576018398", "Apulo", |
217
|
|
|
|
|
|
|
"576049092", "Medellín", |
218
|
|
|
|
|
|
|
"576018252", "Madrid", |
219
|
|
|
|
|
|
|
"576018446", "Villeta", |
220
|
|
|
|
|
|
|
"576018230", "Subachoque", |
221
|
|
|
|
|
|
|
"576018481", "Quebradanegra", |
222
|
|
|
|
|
|
|
"576018480", "Quebradanegra", |
223
|
|
|
|
|
|
|
"576048722", "Medellín", |
224
|
|
|
|
|
|
|
"576018453", "La\ Florida", |
225
|
|
|
|
|
|
|
"5760764", "Bucaramanga", |
226
|
|
|
|
|
|
|
"57601827", "Mosquera", |
227
|
|
|
|
|
|
|
"576018416", "Guaduas", |
228
|
|
|
|
|
|
|
"576018373", "Beltrán", |
229
|
|
|
|
|
|
|
"576045", "Medellín", |
230
|
|
|
|
|
|
|
"576018245", "Subachoque", |
231
|
|
|
|
|
|
|
"5760634", "Pereira", |
232
|
|
|
|
|
|
|
"57601830", "Girardot", |
233
|
|
|
|
|
|
|
"576018402", "San\ Antonio\ de\ Tequendama", |
234
|
|
|
|
|
|
|
"5760231", "Cali", |
235
|
|
|
|
|
|
|
"5760688", "Manizales", |
236
|
|
|
|
|
|
|
"57601821", "Funza", |
237
|
|
|
|
|
|
|
"5760636", "Eje\ Cafetero", |
238
|
|
|
|
|
|
|
"576016", "Bogotá", |
239
|
|
|
|
|
|
|
"5760288", "Cali", |
240
|
|
|
|
|
|
|
"5760631", "Pereira", |
241
|
|
|
|
|
|
|
"5760567", "Cartagena", |
242
|
|
|
|
|
|
|
"5760826", "Ibague", |
243
|
|
|
|
|
|
|
"5760886", "Neiva", |
244
|
|
|
|
|
|
|
"576018384", "Viota", |
245
|
|
|
|
|
|
|
"576018417", "Guaduas", |
246
|
|
|
|
|
|
|
"5760538", "Barranquilla", |
247
|
|
|
|
|
|
|
"5760234", "Cali", |
248
|
|
|
|
|
|
|
"576048721", "Medellín", |
249
|
|
|
|
|
|
|
"576048720", "Medellín", |
250
|
|
|
|
|
|
|
"576018433", "Ninaima\/Tobia", |
251
|
|
|
|
|
|
|
"576018283", "Mosquera", |
252
|
|
|
|
|
|
|
"5760230", "Cali", |
253
|
|
|
|
|
|
|
"576018447", "Villeta", |
254
|
|
|
|
|
|
|
"576018232", "Funza", |
255
|
|
|
|
|
|
|
"5760236", "Cali", |
256
|
|
|
|
|
|
|
"576018482", "La\ Magdalena", |
257
|
|
|
|
|
|
|
"576018251", "Madrid", |
258
|
|
|
|
|
|
|
"576018250", "Madrid", |
259
|
|
|
|
|
|
|
"576018385", "Nariño", |
260
|
|
|
|
|
|
|
"57604842", "Medellín", |
261
|
|
|
|
|
|
|
"5760761", "Bucaramanga", |
262
|
|
|
|
|
|
|
"5760565", "Cartagena", |
263
|
|
|
|
|
|
|
"57601826", "Funza", |
264
|
|
|
|
|
|
|
"5760758", "Cucuta",}; |
265
|
|
|
|
|
|
|
$areanames{es} = {}; |
266
|
|
|
|
|
|
|
|
267
|
|
|
|
|
|
|
sub new { |
268
|
13
|
|
|
13
|
1
|
35
|
my $class = shift; |
269
|
13
|
|
|
|
|
24
|
my $number = shift; |
270
|
13
|
|
|
|
|
83
|
$number =~ s/(^\+57|\D)//g; |
271
|
13
|
|
|
|
|
113
|
my $self = bless({ country_code => '57', number => $number, formatters => $formatters, validators => $validators, areanames => \%areanames}, $class); |
272
|
13
|
100
|
|
|
|
62
|
return $self if ($self->is_valid()); |
273
|
1
|
|
|
|
|
7
|
$number =~ s/^(?:0(4(?:[14]4|56)|[579])?)//; |
274
|
1
|
|
|
|
|
12
|
$self = bless({ country_code => '57', number => $number, formatters => $formatters, validators => $validators, areanames => \%areanames}, $class); |
275
|
1
|
50
|
|
|
|
4
|
return $self->is_valid() ? $self : undef; |
276
|
|
|
|
|
|
|
} |
277
|
|
|
|
|
|
|
1; |