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::TW; |
20
|
2
|
|
|
2
|
|
1161
|
use base qw(Number::Phone::StubCountry); |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
219
|
|
21
|
|
|
|
|
|
|
|
22
|
2
|
|
|
2
|
|
23
|
use strict; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
49
|
|
23
|
2
|
|
|
2
|
|
13
|
use warnings; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
101
|
|
24
|
2
|
|
|
2
|
|
12
|
use utf8; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
12
|
|
25
|
|
|
|
|
|
|
our $VERSION = 1.20230614174404; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
my $formatters = [ |
28
|
|
|
|
|
|
|
{ |
29
|
|
|
|
|
|
|
'format' => '$1 $2 $3', |
30
|
|
|
|
|
|
|
'leading_digits' => '202', |
31
|
|
|
|
|
|
|
'national_rule' => '0$1', |
32
|
|
|
|
|
|
|
'pattern' => '(\\d{2})(\\d)(\\d{4})' |
33
|
|
|
|
|
|
|
}, |
34
|
|
|
|
|
|
|
{ |
35
|
|
|
|
|
|
|
'format' => '$1 $2 $3', |
36
|
|
|
|
|
|
|
'leading_digits' => '[258]0', |
37
|
|
|
|
|
|
|
'national_rule' => '0$1', |
38
|
|
|
|
|
|
|
'pattern' => '(\\d{2})(\\d{3})(\\d{3,4})' |
39
|
|
|
|
|
|
|
}, |
40
|
|
|
|
|
|
|
{ |
41
|
|
|
|
|
|
|
'format' => '$1 $2 $3', |
42
|
|
|
|
|
|
|
'leading_digits' => ' |
43
|
|
|
|
|
|
|
[23568]| |
44
|
|
|
|
|
|
|
4(?: |
45
|
|
|
|
|
|
|
0[2-48]| |
46
|
|
|
|
|
|
|
[1-47-9] |
47
|
|
|
|
|
|
|
)| |
48
|
|
|
|
|
|
|
(?: |
49
|
|
|
|
|
|
|
400| |
50
|
|
|
|
|
|
|
7 |
51
|
|
|
|
|
|
|
)[1-9] |
52
|
|
|
|
|
|
|
', |
53
|
|
|
|
|
|
|
'national_rule' => '0$1', |
54
|
|
|
|
|
|
|
'pattern' => '(\\d)(\\d{3,4})(\\d{4})' |
55
|
|
|
|
|
|
|
}, |
56
|
|
|
|
|
|
|
{ |
57
|
|
|
|
|
|
|
'format' => '$1 $2 $3', |
58
|
|
|
|
|
|
|
'leading_digits' => '[49]', |
59
|
|
|
|
|
|
|
'national_rule' => '0$1', |
60
|
|
|
|
|
|
|
'pattern' => '(\\d{3})(\\d{3})(\\d{3})' |
61
|
|
|
|
|
|
|
}, |
62
|
|
|
|
|
|
|
{ |
63
|
|
|
|
|
|
|
'format' => '$1 $2 $3', |
64
|
|
|
|
|
|
|
'leading_digits' => '7', |
65
|
|
|
|
|
|
|
'national_rule' => '0$1', |
66
|
|
|
|
|
|
|
'pattern' => '(\\d{2})(\\d{4})(\\d{4,5})' |
67
|
|
|
|
|
|
|
} |
68
|
|
|
|
|
|
|
]; |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
my $validators = { |
71
|
|
|
|
|
|
|
'fixed_line' => ' |
72
|
|
|
|
|
|
|
(?: |
73
|
|
|
|
|
|
|
2[2-8]\\d| |
74
|
|
|
|
|
|
|
370| |
75
|
|
|
|
|
|
|
55[01]| |
76
|
|
|
|
|
|
|
7[1-9] |
77
|
|
|
|
|
|
|
)\\d{6}| |
78
|
|
|
|
|
|
|
4(?: |
79
|
|
|
|
|
|
|
(?: |
80
|
|
|
|
|
|
|
0(?: |
81
|
|
|
|
|
|
|
0[1-9]| |
82
|
|
|
|
|
|
|
[2-48]\\d |
83
|
|
|
|
|
|
|
)| |
84
|
|
|
|
|
|
|
1[023]\\d |
85
|
|
|
|
|
|
|
)\\d{4,5}| |
86
|
|
|
|
|
|
|
(?: |
87
|
|
|
|
|
|
|
[239]\\d\\d| |
88
|
|
|
|
|
|
|
4(?: |
89
|
|
|
|
|
|
|
0[56]| |
90
|
|
|
|
|
|
|
12| |
91
|
|
|
|
|
|
|
49 |
92
|
|
|
|
|
|
|
) |
93
|
|
|
|
|
|
|
)\\d{5} |
94
|
|
|
|
|
|
|
)| |
95
|
|
|
|
|
|
|
6(?: |
96
|
|
|
|
|
|
|
[01]\\d{7}| |
97
|
|
|
|
|
|
|
4(?: |
98
|
|
|
|
|
|
|
0[56]| |
99
|
|
|
|
|
|
|
12| |
100
|
|
|
|
|
|
|
24| |
101
|
|
|
|
|
|
|
4[09] |
102
|
|
|
|
|
|
|
)\\d{4,5} |
103
|
|
|
|
|
|
|
)| |
104
|
|
|
|
|
|
|
8(?: |
105
|
|
|
|
|
|
|
(?: |
106
|
|
|
|
|
|
|
2(?: |
107
|
|
|
|
|
|
|
3\\d| |
108
|
|
|
|
|
|
|
4[0-269]| |
109
|
|
|
|
|
|
|
[578]0| |
110
|
|
|
|
|
|
|
66 |
111
|
|
|
|
|
|
|
)| |
112
|
|
|
|
|
|
|
36[24-9]| |
113
|
|
|
|
|
|
|
90\\d\\d |
114
|
|
|
|
|
|
|
)\\d{4}| |
115
|
|
|
|
|
|
|
4(?: |
116
|
|
|
|
|
|
|
0[56]| |
117
|
|
|
|
|
|
|
12| |
118
|
|
|
|
|
|
|
24| |
119
|
|
|
|
|
|
|
4[09] |
120
|
|
|
|
|
|
|
)\\d{4,5} |
121
|
|
|
|
|
|
|
)| |
122
|
|
|
|
|
|
|
(?: |
123
|
|
|
|
|
|
|
2(?: |
124
|
|
|
|
|
|
|
2(?: |
125
|
|
|
|
|
|
|
0\\d\\d| |
126
|
|
|
|
|
|
|
4(?: |
127
|
|
|
|
|
|
|
0[68]| |
128
|
|
|
|
|
|
|
[249]0| |
129
|
|
|
|
|
|
|
3[0-467]| |
130
|
|
|
|
|
|
|
5[0-25-9]| |
131
|
|
|
|
|
|
|
6[0235689] |
132
|
|
|
|
|
|
|
) |
133
|
|
|
|
|
|
|
)| |
134
|
|
|
|
|
|
|
(?: |
135
|
|
|
|
|
|
|
3(?: |
136
|
|
|
|
|
|
|
[09]\\d| |
137
|
|
|
|
|
|
|
1[0-4] |
138
|
|
|
|
|
|
|
)| |
139
|
|
|
|
|
|
|
(?: |
140
|
|
|
|
|
|
|
4\\d| |
141
|
|
|
|
|
|
|
5[0-49]| |
142
|
|
|
|
|
|
|
6[0-29]| |
143
|
|
|
|
|
|
|
7[0-5] |
144
|
|
|
|
|
|
|
)\\d |
145
|
|
|
|
|
|
|
)\\d |
146
|
|
|
|
|
|
|
)| |
147
|
|
|
|
|
|
|
(?: |
148
|
|
|
|
|
|
|
(?: |
149
|
|
|
|
|
|
|
3[2-9]| |
150
|
|
|
|
|
|
|
5[2-8]| |
151
|
|
|
|
|
|
|
6[0-35-79]| |
152
|
|
|
|
|
|
|
8[7-9] |
153
|
|
|
|
|
|
|
)\\d\\d| |
154
|
|
|
|
|
|
|
4(?: |
155
|
|
|
|
|
|
|
2(?: |
156
|
|
|
|
|
|
|
[089]\\d| |
157
|
|
|
|
|
|
|
7[1-9] |
158
|
|
|
|
|
|
|
)| |
159
|
|
|
|
|
|
|
(?: |
160
|
|
|
|
|
|
|
3[0-4]| |
161
|
|
|
|
|
|
|
[78]\\d| |
162
|
|
|
|
|
|
|
9[01] |
163
|
|
|
|
|
|
|
)\\d |
164
|
|
|
|
|
|
|
) |
165
|
|
|
|
|
|
|
)\\d |
166
|
|
|
|
|
|
|
)\\d{3} |
167
|
|
|
|
|
|
|
', |
168
|
|
|
|
|
|
|
'geographic' => ' |
169
|
|
|
|
|
|
|
(?: |
170
|
|
|
|
|
|
|
2[2-8]\\d| |
171
|
|
|
|
|
|
|
370| |
172
|
|
|
|
|
|
|
55[01]| |
173
|
|
|
|
|
|
|
7[1-9] |
174
|
|
|
|
|
|
|
)\\d{6}| |
175
|
|
|
|
|
|
|
4(?: |
176
|
|
|
|
|
|
|
(?: |
177
|
|
|
|
|
|
|
0(?: |
178
|
|
|
|
|
|
|
0[1-9]| |
179
|
|
|
|
|
|
|
[2-48]\\d |
180
|
|
|
|
|
|
|
)| |
181
|
|
|
|
|
|
|
1[023]\\d |
182
|
|
|
|
|
|
|
)\\d{4,5}| |
183
|
|
|
|
|
|
|
(?: |
184
|
|
|
|
|
|
|
[239]\\d\\d| |
185
|
|
|
|
|
|
|
4(?: |
186
|
|
|
|
|
|
|
0[56]| |
187
|
|
|
|
|
|
|
12| |
188
|
|
|
|
|
|
|
49 |
189
|
|
|
|
|
|
|
) |
190
|
|
|
|
|
|
|
)\\d{5} |
191
|
|
|
|
|
|
|
)| |
192
|
|
|
|
|
|
|
6(?: |
193
|
|
|
|
|
|
|
[01]\\d{7}| |
194
|
|
|
|
|
|
|
4(?: |
195
|
|
|
|
|
|
|
0[56]| |
196
|
|
|
|
|
|
|
12| |
197
|
|
|
|
|
|
|
24| |
198
|
|
|
|
|
|
|
4[09] |
199
|
|
|
|
|
|
|
)\\d{4,5} |
200
|
|
|
|
|
|
|
)| |
201
|
|
|
|
|
|
|
8(?: |
202
|
|
|
|
|
|
|
(?: |
203
|
|
|
|
|
|
|
2(?: |
204
|
|
|
|
|
|
|
3\\d| |
205
|
|
|
|
|
|
|
4[0-269]| |
206
|
|
|
|
|
|
|
[578]0| |
207
|
|
|
|
|
|
|
66 |
208
|
|
|
|
|
|
|
)| |
209
|
|
|
|
|
|
|
36[24-9]| |
210
|
|
|
|
|
|
|
90\\d\\d |
211
|
|
|
|
|
|
|
)\\d{4}| |
212
|
|
|
|
|
|
|
4(?: |
213
|
|
|
|
|
|
|
0[56]| |
214
|
|
|
|
|
|
|
12| |
215
|
|
|
|
|
|
|
24| |
216
|
|
|
|
|
|
|
4[09] |
217
|
|
|
|
|
|
|
)\\d{4,5} |
218
|
|
|
|
|
|
|
)| |
219
|
|
|
|
|
|
|
(?: |
220
|
|
|
|
|
|
|
2(?: |
221
|
|
|
|
|
|
|
2(?: |
222
|
|
|
|
|
|
|
0\\d\\d| |
223
|
|
|
|
|
|
|
4(?: |
224
|
|
|
|
|
|
|
0[68]| |
225
|
|
|
|
|
|
|
[249]0| |
226
|
|
|
|
|
|
|
3[0-467]| |
227
|
|
|
|
|
|
|
5[0-25-9]| |
228
|
|
|
|
|
|
|
6[0235689] |
229
|
|
|
|
|
|
|
) |
230
|
|
|
|
|
|
|
)| |
231
|
|
|
|
|
|
|
(?: |
232
|
|
|
|
|
|
|
3(?: |
233
|
|
|
|
|
|
|
[09]\\d| |
234
|
|
|
|
|
|
|
1[0-4] |
235
|
|
|
|
|
|
|
)| |
236
|
|
|
|
|
|
|
(?: |
237
|
|
|
|
|
|
|
4\\d| |
238
|
|
|
|
|
|
|
5[0-49]| |
239
|
|
|
|
|
|
|
6[0-29]| |
240
|
|
|
|
|
|
|
7[0-5] |
241
|
|
|
|
|
|
|
)\\d |
242
|
|
|
|
|
|
|
)\\d |
243
|
|
|
|
|
|
|
)| |
244
|
|
|
|
|
|
|
(?: |
245
|
|
|
|
|
|
|
(?: |
246
|
|
|
|
|
|
|
3[2-9]| |
247
|
|
|
|
|
|
|
5[2-8]| |
248
|
|
|
|
|
|
|
6[0-35-79]| |
249
|
|
|
|
|
|
|
8[7-9] |
250
|
|
|
|
|
|
|
)\\d\\d| |
251
|
|
|
|
|
|
|
4(?: |
252
|
|
|
|
|
|
|
2(?: |
253
|
|
|
|
|
|
|
[089]\\d| |
254
|
|
|
|
|
|
|
7[1-9] |
255
|
|
|
|
|
|
|
)| |
256
|
|
|
|
|
|
|
(?: |
257
|
|
|
|
|
|
|
3[0-4]| |
258
|
|
|
|
|
|
|
[78]\\d| |
259
|
|
|
|
|
|
|
9[01] |
260
|
|
|
|
|
|
|
)\\d |
261
|
|
|
|
|
|
|
) |
262
|
|
|
|
|
|
|
)\\d |
263
|
|
|
|
|
|
|
)\\d{3} |
264
|
|
|
|
|
|
|
', |
265
|
|
|
|
|
|
|
'mobile' => ' |
266
|
|
|
|
|
|
|
(?: |
267
|
|
|
|
|
|
|
40001[0-2]| |
268
|
|
|
|
|
|
|
9[0-8]\\d{4} |
269
|
|
|
|
|
|
|
)\\d{3} |
270
|
|
|
|
|
|
|
', |
271
|
|
|
|
|
|
|
'pager' => '', |
272
|
|
|
|
|
|
|
'personal_number' => '99\\d{7}', |
273
|
|
|
|
|
|
|
'specialrate' => '( |
274
|
|
|
|
|
|
|
20(?: |
275
|
|
|
|
|
|
|
[013-9]\\d\\d| |
276
|
|
|
|
|
|
|
2 |
277
|
|
|
|
|
|
|
)\\d{4} |
278
|
|
|
|
|
|
|
)|(50[0-46-9]\\d{6})', |
279
|
|
|
|
|
|
|
'toll_free' => ' |
280
|
|
|
|
|
|
|
80[0-79]\\d{6}| |
281
|
|
|
|
|
|
|
800\\d{5} |
282
|
|
|
|
|
|
|
', |
283
|
|
|
|
|
|
|
'voip' => ' |
284
|
|
|
|
|
|
|
7010(?: |
285
|
|
|
|
|
|
|
[0-2679]\\d| |
286
|
|
|
|
|
|
|
3[0-7]| |
287
|
|
|
|
|
|
|
8[0-5] |
288
|
|
|
|
|
|
|
)\\d{5}| |
289
|
|
|
|
|
|
|
70\\d{8} |
290
|
|
|
|
|
|
|
' |
291
|
|
|
|
|
|
|
}; |
292
|
|
|
|
|
|
|
my %areanames = (); |
293
|
|
|
|
|
|
|
$areanames{zh} = {"88684", "屏东", |
294
|
|
|
|
|
|
|
"8862", "台北", |
295
|
|
|
|
|
|
|
"88687", "屏东", |
296
|
|
|
|
|
|
|
"88671", "高雄", |
297
|
|
|
|
|
|
|
"88643", "台中\、彰化", |
298
|
|
|
|
|
|
|
"88688", "屏东", |
299
|
|
|
|
|
|
|
"886823", "金门", |
300
|
|
|
|
|
|
|
"886404", "台中\、彰化", |
301
|
|
|
|
|
|
|
"88655", "嘉义\、云林", |
302
|
|
|
|
|
|
|
"88653", "嘉义\、云林", |
303
|
|
|
|
|
|
|
"8864004", "台中\、彰化", |
304
|
|
|
|
|
|
|
"88656", "嘉义\、云林", |
305
|
|
|
|
|
|
|
"886403", "台中\、彰化", |
306
|
|
|
|
|
|
|
"886824", "金门", |
307
|
|
|
|
|
|
|
"886825", "金门", |
308
|
|
|
|
|
|
|
"88641", "台中\、彰化", |
309
|
|
|
|
|
|
|
"88673", "高雄", |
310
|
|
|
|
|
|
|
"88675", "高雄", |
311
|
|
|
|
|
|
|
"88689", "台东", |
312
|
|
|
|
|
|
|
"8864001", "台中\、彰化", |
313
|
|
|
|
|
|
|
"88676", "高雄", |
314
|
|
|
|
|
|
|
"88648", "台中\、彰化", |
315
|
|
|
|
|
|
|
"88683", "马祖", |
316
|
|
|
|
|
|
|
"8864006", "台中\、彰化", |
317
|
|
|
|
|
|
|
"88652", "嘉义\、云林", |
318
|
|
|
|
|
|
|
"886408", "台中\、彰化", |
319
|
|
|
|
|
|
|
"88679", "高雄", |
320
|
|
|
|
|
|
|
"8864007", "台中\、彰化", |
321
|
|
|
|
|
|
|
"88647", "台中\、彰化", |
322
|
|
|
|
|
|
|
"886826", "乌丘", |
323
|
|
|
|
|
|
|
"88672", "高雄", |
324
|
|
|
|
|
|
|
"8864005", "台中\、彰化", |
325
|
|
|
|
|
|
|
"8864003", "台中\、彰化", |
326
|
|
|
|
|
|
|
"88644", "台中\、彰化", |
327
|
|
|
|
|
|
|
"8866", "台南\、澎湖", |
328
|
|
|
|
|
|
|
"88637", "苗栗", |
329
|
|
|
|
|
|
|
"8868230", "屏东", |
330
|
|
|
|
|
|
|
"886402", "台中\、彰化", |
331
|
|
|
|
|
|
|
"88680", "屏东", |
332
|
|
|
|
|
|
|
"8863", "桃园\、新竹\、花莲\、宜兰", |
333
|
|
|
|
|
|
|
"88678", "高雄", |
334
|
|
|
|
|
|
|
"88654", "嘉义\、云林", |
335
|
|
|
|
|
|
|
"88649", "南投", |
336
|
|
|
|
|
|
|
"88677", "高雄", |
337
|
|
|
|
|
|
|
"886828", "金门", |
338
|
|
|
|
|
|
|
"8864008", "台中\、彰化", |
339
|
|
|
|
|
|
|
"8864009", "台中\、彰化", |
340
|
|
|
|
|
|
|
"88674", "高雄", |
341
|
|
|
|
|
|
|
"88642", "台中\、彰化", |
342
|
|
|
|
|
|
|
"88658", "嘉义\、云林", |
343
|
|
|
|
|
|
|
"88657", "嘉义\、云林", |
344
|
|
|
|
|
|
|
"8864002", "台中\、彰化", |
345
|
|
|
|
|
|
|
"886827", "金门",}; |
346
|
|
|
|
|
|
|
$areanames{en} = {"88687", "Pingtung", |
347
|
|
|
|
|
|
|
"88671", "Kaohsiung", |
348
|
|
|
|
|
|
|
"886823", "Kinmen", |
349
|
|
|
|
|
|
|
"88688", "Pingtung", |
350
|
|
|
|
|
|
|
"88643", "Taichung\/Changhua", |
351
|
|
|
|
|
|
|
"886404", "Taichung\/Changhua", |
352
|
|
|
|
|
|
|
"88684", "Pingtung", |
353
|
|
|
|
|
|
|
"8862", "Taipei", |
354
|
|
|
|
|
|
|
"886403", "Taichung\/Changhua", |
355
|
|
|
|
|
|
|
"88641", "Taichung\/Changhua", |
356
|
|
|
|
|
|
|
"886824", "Kinmen", |
357
|
|
|
|
|
|
|
"886825", "Kinmen", |
358
|
|
|
|
|
|
|
"88675", "Kaohsiung", |
359
|
|
|
|
|
|
|
"88673", "Kaohsiung", |
360
|
|
|
|
|
|
|
"88689", "Taitung", |
361
|
|
|
|
|
|
|
"8864001", "Taichung\/Changhua", |
362
|
|
|
|
|
|
|
"88676", "Kaohsiung", |
363
|
|
|
|
|
|
|
"88653", "Chiayi\/Yunlin", |
364
|
|
|
|
|
|
|
"88655", "Chiayi\/Yunlin", |
365
|
|
|
|
|
|
|
"8864004", "Taichung\/Changhua", |
366
|
|
|
|
|
|
|
"88656", "Chiayi\/Yunlin", |
367
|
|
|
|
|
|
|
"88637", "Miaoli", |
368
|
|
|
|
|
|
|
"8866", "Tainan\/Penghu", |
369
|
|
|
|
|
|
|
"88672", "Kaohsiung", |
370
|
|
|
|
|
|
|
"8864005", "Taichung\/Changhua", |
371
|
|
|
|
|
|
|
"88644", "Taichung\/Changhua", |
372
|
|
|
|
|
|
|
"8864003", "Taichung\/Changhua", |
373
|
|
|
|
|
|
|
"886402", "Taichung\/Changhua", |
374
|
|
|
|
|
|
|
"8863", "Taoyuan\/Hsinchu\/Yilan\/Hualien", |
375
|
|
|
|
|
|
|
"88680", "Pingtung", |
376
|
|
|
|
|
|
|
"886408", "Taichung\/Changhua", |
377
|
|
|
|
|
|
|
"8864006", "Taichung\/Changhua", |
378
|
|
|
|
|
|
|
"88652", "Chiayi\/Yunlin", |
379
|
|
|
|
|
|
|
"88648", "Taichung\/Changhua", |
380
|
|
|
|
|
|
|
"88683", "Matsu", |
381
|
|
|
|
|
|
|
"88679", "Kaohsiung", |
382
|
|
|
|
|
|
|
"8864007", "Taichung\/Changhua", |
383
|
|
|
|
|
|
|
"88647", "Taichung\/Changhua", |
384
|
|
|
|
|
|
|
"886826", "Wuqiu", |
385
|
|
|
|
|
|
|
"88658", "Chiayi\/Yunlin", |
386
|
|
|
|
|
|
|
"88674", "Kaohsiung", |
387
|
|
|
|
|
|
|
"88642", "Taichung\/Changhua", |
388
|
|
|
|
|
|
|
"88657", "Chiayi\/Yunlin", |
389
|
|
|
|
|
|
|
"8864002", "Taichung\/Changhua", |
390
|
|
|
|
|
|
|
"886827", "Kinmen", |
391
|
|
|
|
|
|
|
"88654", "Chiayi\/Yunlin", |
392
|
|
|
|
|
|
|
"88678", "Kaohsiung", |
393
|
|
|
|
|
|
|
"88649", "Nantou", |
394
|
|
|
|
|
|
|
"886828", "Kinmen", |
395
|
|
|
|
|
|
|
"88677", "Kaohsiung", |
396
|
|
|
|
|
|
|
"8864009", "Taichung\/Changhua", |
397
|
|
|
|
|
|
|
"8864008", "Taichung\/Changhua",}; |
398
|
|
|
|
|
|
|
|
399
|
|
|
|
|
|
|
sub new { |
400
|
22
|
|
|
22
|
1
|
47
|
my $class = shift; |
401
|
22
|
|
|
|
|
50
|
my $number = shift; |
402
|
22
|
|
|
|
|
144
|
$number =~ s/(^\+886|\D)//g; |
403
|
22
|
|
|
|
|
133
|
my $self = bless({ country_code => '886', number => $number, formatters => $formatters, validators => $validators, areanames => \%areanames}, $class); |
404
|
22
|
100
|
|
|
|
113
|
return $self if ($self->is_valid()); |
405
|
1
|
|
|
|
|
3
|
$number =~ s/^(?:0)//; |
406
|
1
|
|
|
|
|
12
|
$self = bless({ country_code => '886', number => $number, formatters => $formatters, validators => $validators, areanames => \%areanames}, $class); |
407
|
1
|
50
|
|
|
|
14
|
return $self->is_valid() ? $self : undef; |
408
|
|
|
|
|
|
|
} |
409
|
|
|
|
|
|
|
1; |