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
|
|
1323
|
use base qw(Number::Phone::StubCountry); |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
269
|
|
21
|
|
|
|
|
|
|
|
22
|
2
|
|
|
2
|
|
17
|
use strict; |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
53
|
|
23
|
2
|
|
|
2
|
|
12
|
use warnings; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
58
|
|
24
|
2
|
|
|
2
|
|
18
|
use utf8; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
16
|
|
25
|
|
|
|
|
|
|
our $VERSION = 1.20230614174403; |
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} = {"962538", "Zarqa", |
244
|
|
|
|
|
|
|
"962263", "Jarash", |
245
|
|
|
|
|
|
|
"9623262", "Southern\ Region", |
246
|
|
|
|
|
|
|
"962327", "Karak", |
247
|
|
|
|
|
|
|
"962532", "Madaba", |
248
|
|
|
|
|
|
|
"962537", "Zarqa", |
249
|
|
|
|
|
|
|
"962625", "Amman", |
250
|
|
|
|
|
|
|
"962322", "Tafileh", |
251
|
|
|
|
|
|
|
"962531", "Madaba", |
252
|
|
|
|
|
|
|
"962320", "Aqaba", |
253
|
|
|
|
|
|
|
"962530", "Zarqa", |
254
|
|
|
|
|
|
|
"962321", "Ma\’an", |
255
|
|
|
|
|
|
|
"962534", "Balqa", |
256
|
|
|
|
|
|
|
"962535", "Balqa", |
257
|
|
|
|
|
|
|
"962539", "Zarqa", |
258
|
|
|
|
|
|
|
"962324", "Aqaba", |
259
|
|
|
|
|
|
|
"962266", "Mafraq", |
260
|
|
|
|
|
|
|
"962622", "Greater\ Amman", |
261
|
|
|
|
|
|
|
"962325", "Maan", |
262
|
|
|
|
|
|
|
"962620", "Amman", |
263
|
|
|
|
|
|
|
"962536", "Zarqa", |
264
|
|
|
|
|
|
|
"962264", "Ajloun", |
265
|
|
|
|
|
|
|
"962265", "Irbid", |
266
|
|
|
|
|
|
|
"962269", "Irbid", |
267
|
|
|
|
|
|
|
"96265", "Amman", |
268
|
|
|
|
|
|
|
"96263", "Amman", |
269
|
|
|
|
|
|
|
"962267", "Jarash", |
270
|
|
|
|
|
|
|
"962262", "Mafraq", |
271
|
|
|
|
|
|
|
"96227", "Irbid", |
272
|
|
|
|
|
|
|
"9623260", "Tafileh", |
273
|
|
|
|
|
|
|
"96264", "Amman", |
274
|
|
|
|
|
|
|
"962323", "Karak", |
275
|
|
|
|
|
|
|
"962533", "Balqa", |
276
|
|
|
|
|
|
|
"962647", "Greater\ Amman", |
277
|
|
|
|
|
|
|
"962268", "Ajloun",}; |
278
|
|
|
|
|
|
|
|
279
|
|
|
|
|
|
|
sub new { |
280
|
25
|
|
|
25
|
1
|
88
|
my $class = shift; |
281
|
25
|
|
|
|
|
39
|
my $number = shift; |
282
|
25
|
|
|
|
|
167
|
$number =~ s/(^\+962|\D)//g; |
283
|
25
|
|
|
|
|
180
|
my $self = bless({ country_code => '962', number => $number, formatters => $formatters, validators => $validators, areanames => \%areanames}, $class); |
284
|
25
|
100
|
|
|
|
123
|
return $self if ($self->is_valid()); |
285
|
1
|
|
|
|
|
4
|
$number =~ s/^(?:0)//; |
286
|
1
|
|
|
|
|
14
|
$self = bless({ country_code => '962', number => $number, formatters => $formatters, validators => $validators, areanames => \%areanames}, $class); |
287
|
1
|
50
|
|
|
|
6
|
return $self->is_valid() ? $self : undef; |
288
|
|
|
|
|
|
|
} |
289
|
|
|
|
|
|
|
1; |