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