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::JO; |
20
|
2
|
|
|
2
|
|
1189
|
use base qw(Number::Phone::StubCountry); |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
253
|
|
21
|
|
|
|
|
|
|
|
22
|
2
|
|
|
2
|
|
16
|
use strict; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
55
|
|
23
|
2
|
|
|
2
|
|
16
|
use warnings; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
53
|
|
24
|
2
|
|
|
2
|
|
14
|
use utf8; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
14
|
|
25
|
|
|
|
|
|
|
our $VERSION = 1.20230307181420; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
my $formatters = [ |
28
|
|
|
|
|
|
|
{ |
29
|
|
|
|
|
|
|
'format' => '$1 $2 $3', |
30
|
|
|
|
|
|
|
'leading_digits' => ' |
31
|
|
|
|
|
|
|
[2356]| |
32
|
|
|
|
|
|
|
87 |
33
|
|
|
|
|
|
|
', |
34
|
|
|
|
|
|
|
'national_rule' => '(0$1)', |
35
|
|
|
|
|
|
|
'pattern' => '(\\d)(\\d{3})(\\d{4})' |
36
|
|
|
|
|
|
|
}, |
37
|
|
|
|
|
|
|
{ |
38
|
|
|
|
|
|
|
'format' => '$1 $2', |
39
|
|
|
|
|
|
|
'leading_digits' => '[89]', |
40
|
|
|
|
|
|
|
'national_rule' => '0$1', |
41
|
|
|
|
|
|
|
'pattern' => '(\\d{3})(\\d{5,6})' |
42
|
|
|
|
|
|
|
}, |
43
|
|
|
|
|
|
|
{ |
44
|
|
|
|
|
|
|
'format' => '$1 $2', |
45
|
|
|
|
|
|
|
'leading_digits' => '70', |
46
|
|
|
|
|
|
|
'national_rule' => '0$1', |
47
|
|
|
|
|
|
|
'pattern' => '(\\d{2})(\\d{7})' |
48
|
|
|
|
|
|
|
}, |
49
|
|
|
|
|
|
|
{ |
50
|
|
|
|
|
|
|
'format' => '$1 $2 $3', |
51
|
|
|
|
|
|
|
'leading_digits' => '7', |
52
|
|
|
|
|
|
|
'national_rule' => '0$1', |
53
|
|
|
|
|
|
|
'pattern' => '(\\d)(\\d{4})(\\d{4})' |
54
|
|
|
|
|
|
|
} |
55
|
|
|
|
|
|
|
]; |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
my $validators = { |
58
|
|
|
|
|
|
|
'fixed_line' => ' |
59
|
|
|
|
|
|
|
87(?: |
60
|
|
|
|
|
|
|
000| |
61
|
|
|
|
|
|
|
90[01] |
62
|
|
|
|
|
|
|
)\\d{3}| |
63
|
|
|
|
|
|
|
(?: |
64
|
|
|
|
|
|
|
2(?: |
65
|
|
|
|
|
|
|
6(?: |
66
|
|
|
|
|
|
|
2[0-35-9]| |
67
|
|
|
|
|
|
|
3[0-578]| |
68
|
|
|
|
|
|
|
4[24-7]| |
69
|
|
|
|
|
|
|
5[0-24-8]| |
70
|
|
|
|
|
|
|
[6-8][023]| |
71
|
|
|
|
|
|
|
9[0-3] |
72
|
|
|
|
|
|
|
)| |
73
|
|
|
|
|
|
|
7(?: |
74
|
|
|
|
|
|
|
0[1-79]| |
75
|
|
|
|
|
|
|
10| |
76
|
|
|
|
|
|
|
2[014-7]| |
77
|
|
|
|
|
|
|
3[0-689]| |
78
|
|
|
|
|
|
|
4[019]| |
79
|
|
|
|
|
|
|
5[0-3578] |
80
|
|
|
|
|
|
|
) |
81
|
|
|
|
|
|
|
)| |
82
|
|
|
|
|
|
|
32(?: |
83
|
|
|
|
|
|
|
0[1-69]| |
84
|
|
|
|
|
|
|
1[1-35-7]| |
85
|
|
|
|
|
|
|
2[024-7]| |
86
|
|
|
|
|
|
|
3\\d| |
87
|
|
|
|
|
|
|
4[0-3]| |
88
|
|
|
|
|
|
|
[5-7][023] |
89
|
|
|
|
|
|
|
)| |
90
|
|
|
|
|
|
|
53(?: |
91
|
|
|
|
|
|
|
0[0-3]| |
92
|
|
|
|
|
|
|
[13][023]| |
93
|
|
|
|
|
|
|
2[0-59]| |
94
|
|
|
|
|
|
|
49| |
95
|
|
|
|
|
|
|
5[0-35-9]| |
96
|
|
|
|
|
|
|
6[15]| |
97
|
|
|
|
|
|
|
7[45]| |
98
|
|
|
|
|
|
|
8[1-6]| |
99
|
|
|
|
|
|
|
9[0-36-9] |
100
|
|
|
|
|
|
|
)| |
101
|
|
|
|
|
|
|
6(?: |
102
|
|
|
|
|
|
|
2(?: |
103
|
|
|
|
|
|
|
[05]0| |
104
|
|
|
|
|
|
|
22 |
105
|
|
|
|
|
|
|
)| |
106
|
|
|
|
|
|
|
3(?: |
107
|
|
|
|
|
|
|
00| |
108
|
|
|
|
|
|
|
33 |
109
|
|
|
|
|
|
|
)| |
110
|
|
|
|
|
|
|
4(?: |
111
|
|
|
|
|
|
|
0[0-25]| |
112
|
|
|
|
|
|
|
1[2-7]| |
113
|
|
|
|
|
|
|
2[0569]| |
114
|
|
|
|
|
|
|
[38][07-9]| |
115
|
|
|
|
|
|
|
4[025689]| |
116
|
|
|
|
|
|
|
6[0-589]| |
117
|
|
|
|
|
|
|
7\\d| |
118
|
|
|
|
|
|
|
9[0-2] |
119
|
|
|
|
|
|
|
)| |
120
|
|
|
|
|
|
|
5(?: |
121
|
|
|
|
|
|
|
[01][056]| |
122
|
|
|
|
|
|
|
2[034]| |
123
|
|
|
|
|
|
|
3[0-57-9]| |
124
|
|
|
|
|
|
|
4[178]| |
125
|
|
|
|
|
|
|
5[0-69]| |
126
|
|
|
|
|
|
|
6[0-35-9]| |
127
|
|
|
|
|
|
|
7[1-379]| |
128
|
|
|
|
|
|
|
8[0-68]| |
129
|
|
|
|
|
|
|
9[0239] |
130
|
|
|
|
|
|
|
) |
131
|
|
|
|
|
|
|
)| |
132
|
|
|
|
|
|
|
87(?: |
133
|
|
|
|
|
|
|
20| |
134
|
|
|
|
|
|
|
7[078]| |
135
|
|
|
|
|
|
|
99 |
136
|
|
|
|
|
|
|
) |
137
|
|
|
|
|
|
|
)\\d{4} |
138
|
|
|
|
|
|
|
', |
139
|
|
|
|
|
|
|
'geographic' => ' |
140
|
|
|
|
|
|
|
87(?: |
141
|
|
|
|
|
|
|
000| |
142
|
|
|
|
|
|
|
90[01] |
143
|
|
|
|
|
|
|
)\\d{3}| |
144
|
|
|
|
|
|
|
(?: |
145
|
|
|
|
|
|
|
2(?: |
146
|
|
|
|
|
|
|
6(?: |
147
|
|
|
|
|
|
|
2[0-35-9]| |
148
|
|
|
|
|
|
|
3[0-578]| |
149
|
|
|
|
|
|
|
4[24-7]| |
150
|
|
|
|
|
|
|
5[0-24-8]| |
151
|
|
|
|
|
|
|
[6-8][023]| |
152
|
|
|
|
|
|
|
9[0-3] |
153
|
|
|
|
|
|
|
)| |
154
|
|
|
|
|
|
|
7(?: |
155
|
|
|
|
|
|
|
0[1-79]| |
156
|
|
|
|
|
|
|
10| |
157
|
|
|
|
|
|
|
2[014-7]| |
158
|
|
|
|
|
|
|
3[0-689]| |
159
|
|
|
|
|
|
|
4[019]| |
160
|
|
|
|
|
|
|
5[0-3578] |
161
|
|
|
|
|
|
|
) |
162
|
|
|
|
|
|
|
)| |
163
|
|
|
|
|
|
|
32(?: |
164
|
|
|
|
|
|
|
0[1-69]| |
165
|
|
|
|
|
|
|
1[1-35-7]| |
166
|
|
|
|
|
|
|
2[024-7]| |
167
|
|
|
|
|
|
|
3\\d| |
168
|
|
|
|
|
|
|
4[0-3]| |
169
|
|
|
|
|
|
|
[5-7][023] |
170
|
|
|
|
|
|
|
)| |
171
|
|
|
|
|
|
|
53(?: |
172
|
|
|
|
|
|
|
0[0-3]| |
173
|
|
|
|
|
|
|
[13][023]| |
174
|
|
|
|
|
|
|
2[0-59]| |
175
|
|
|
|
|
|
|
49| |
176
|
|
|
|
|
|
|
5[0-35-9]| |
177
|
|
|
|
|
|
|
6[15]| |
178
|
|
|
|
|
|
|
7[45]| |
179
|
|
|
|
|
|
|
8[1-6]| |
180
|
|
|
|
|
|
|
9[0-36-9] |
181
|
|
|
|
|
|
|
)| |
182
|
|
|
|
|
|
|
6(?: |
183
|
|
|
|
|
|
|
2(?: |
184
|
|
|
|
|
|
|
[05]0| |
185
|
|
|
|
|
|
|
22 |
186
|
|
|
|
|
|
|
)| |
187
|
|
|
|
|
|
|
3(?: |
188
|
|
|
|
|
|
|
00| |
189
|
|
|
|
|
|
|
33 |
190
|
|
|
|
|
|
|
)| |
191
|
|
|
|
|
|
|
4(?: |
192
|
|
|
|
|
|
|
0[0-25]| |
193
|
|
|
|
|
|
|
1[2-7]| |
194
|
|
|
|
|
|
|
2[0569]| |
195
|
|
|
|
|
|
|
[38][07-9]| |
196
|
|
|
|
|
|
|
4[025689]| |
197
|
|
|
|
|
|
|
6[0-589]| |
198
|
|
|
|
|
|
|
7\\d| |
199
|
|
|
|
|
|
|
9[0-2] |
200
|
|
|
|
|
|
|
)| |
201
|
|
|
|
|
|
|
5(?: |
202
|
|
|
|
|
|
|
[01][056]| |
203
|
|
|
|
|
|
|
2[034]| |
204
|
|
|
|
|
|
|
3[0-57-9]| |
205
|
|
|
|
|
|
|
4[178]| |
206
|
|
|
|
|
|
|
5[0-69]| |
207
|
|
|
|
|
|
|
6[0-35-9]| |
208
|
|
|
|
|
|
|
7[1-379]| |
209
|
|
|
|
|
|
|
8[0-68]| |
210
|
|
|
|
|
|
|
9[0239] |
211
|
|
|
|
|
|
|
) |
212
|
|
|
|
|
|
|
)| |
213
|
|
|
|
|
|
|
87(?: |
214
|
|
|
|
|
|
|
20| |
215
|
|
|
|
|
|
|
7[078]| |
216
|
|
|
|
|
|
|
99 |
217
|
|
|
|
|
|
|
) |
218
|
|
|
|
|
|
|
)\\d{4} |
219
|
|
|
|
|
|
|
', |
220
|
|
|
|
|
|
|
'mobile' => ' |
221
|
|
|
|
|
|
|
7(?: |
222
|
|
|
|
|
|
|
[78][0-25-9]| |
223
|
|
|
|
|
|
|
9\\d |
224
|
|
|
|
|
|
|
)\\d{6} |
225
|
|
|
|
|
|
|
', |
226
|
|
|
|
|
|
|
'pager' => ' |
227
|
|
|
|
|
|
|
74(?: |
228
|
|
|
|
|
|
|
66| |
229
|
|
|
|
|
|
|
77 |
230
|
|
|
|
|
|
|
)\\d{5} |
231
|
|
|
|
|
|
|
', |
232
|
|
|
|
|
|
|
'personal_number' => '70\\d{7}', |
233
|
|
|
|
|
|
|
'specialrate' => '(85\\d{6})|(9\\d{7})|( |
234
|
|
|
|
|
|
|
8(?: |
235
|
|
|
|
|
|
|
10| |
236
|
|
|
|
|
|
|
8\\d |
237
|
|
|
|
|
|
|
)\\d{5} |
238
|
|
|
|
|
|
|
)', |
239
|
|
|
|
|
|
|
'toll_free' => '80\\d{6}', |
240
|
|
|
|
|
|
|
'voip' => '' |
241
|
|
|
|
|
|
|
}; |
242
|
|
|
|
|
|
|
my %areanames = (); |
243
|
|
|
|
|
|
|
$areanames{en} = {"962535", "Balqa", |
244
|
|
|
|
|
|
|
"962647", "Greater\ Amman", |
245
|
|
|
|
|
|
|
"96265", "Amman", |
246
|
|
|
|
|
|
|
"962538", "Zarqa", |
247
|
|
|
|
|
|
|
"962321", "Ma\’an", |
248
|
|
|
|
|
|
|
"962537", "Zarqa", |
249
|
|
|
|
|
|
|
"962266", "Mafraq", |
250
|
|
|
|
|
|
|
"962532", "Madaba", |
251
|
|
|
|
|
|
|
"962264", "Ajloun", |
252
|
|
|
|
|
|
|
"962533", "Balqa", |
253
|
|
|
|
|
|
|
"962322", "Tafileh", |
254
|
|
|
|
|
|
|
"962539", "Zarqa", |
255
|
|
|
|
|
|
|
"962327", "Karak", |
256
|
|
|
|
|
|
|
"9623262", "Southern\ Region", |
257
|
|
|
|
|
|
|
"962531", "Madaba", |
258
|
|
|
|
|
|
|
"962323", "Karak", |
259
|
|
|
|
|
|
|
"962620", "Amman", |
260
|
|
|
|
|
|
|
"962325", "Maan", |
261
|
|
|
|
|
|
|
"9623260", "Tafileh", |
262
|
|
|
|
|
|
|
"962622", "Greater\ Amman", |
263
|
|
|
|
|
|
|
"962269", "Irbid", |
264
|
|
|
|
|
|
|
"96264", "Amman", |
265
|
|
|
|
|
|
|
"962625", "Amman", |
266
|
|
|
|
|
|
|
"962320", "Aqaba", |
267
|
|
|
|
|
|
|
"962324", "Aqaba", |
268
|
|
|
|
|
|
|
"962268", "Ajloun", |
269
|
|
|
|
|
|
|
"962536", "Zarqa", |
270
|
|
|
|
|
|
|
"962262", "Mafraq", |
271
|
|
|
|
|
|
|
"962267", "Jarash", |
272
|
|
|
|
|
|
|
"962263", "Jarash", |
273
|
|
|
|
|
|
|
"962534", "Balqa", |
274
|
|
|
|
|
|
|
"962530", "Zarqa", |
275
|
|
|
|
|
|
|
"96263", "Amman", |
276
|
|
|
|
|
|
|
"96227", "Irbid", |
277
|
|
|
|
|
|
|
"962265", "Irbid",}; |
278
|
|
|
|
|
|
|
|
279
|
|
|
|
|
|
|
sub new { |
280
|
25
|
|
|
25
|
1
|
55
|
my $class = shift; |
281
|
25
|
|
|
|
|
44
|
my $number = shift; |
282
|
25
|
|
|
|
|
152
|
$number =~ s/(^\+962|\D)//g; |
283
|
25
|
|
|
|
|
137
|
my $self = bless({ country_code => '962', number => $number, formatters => $formatters, validators => $validators, areanames => \%areanames}, $class); |
284
|
25
|
100
|
|
|
|
105
|
return $self if ($self->is_valid()); |
285
|
1
|
|
|
|
|
2
|
$number =~ s/^(?:0)//; |
286
|
1
|
|
|
|
|
13
|
$self = bless({ country_code => '962', number => $number, formatters => $formatters, validators => $validators, areanames => \%areanames}, $class); |
287
|
1
|
50
|
|
|
|
7
|
return $self->is_valid() ? $self : undef; |
288
|
|
|
|
|
|
|
} |
289
|
|
|
|
|
|
|
1; |