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
|
|
1156
|
use base qw(Number::Phone::StubCountry); |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
214
|
|
21
|
|
|
|
|
|
|
|
22
|
2
|
|
|
2
|
|
16
|
use strict; |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
47
|
|
23
|
2
|
|
|
2
|
|
11
|
use warnings; |
|
2
|
|
|
|
|
16
|
|
|
2
|
|
|
|
|
56
|
|
24
|
2
|
|
|
2
|
|
17
|
use utf8; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
11
|
|
25
|
|
|
|
|
|
|
our $VERSION = 1.20230903131448; |
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} = {"88648", "台中\、彰化", |
294
|
|
|
|
|
|
|
"8862", "台北", |
295
|
|
|
|
|
|
|
"88676", "高雄", |
296
|
|
|
|
|
|
|
"88687", "屏东", |
297
|
|
|
|
|
|
|
"88652", "嘉义\、云林", |
298
|
|
|
|
|
|
|
"88672", "高雄", |
299
|
|
|
|
|
|
|
"88643", "台中\、彰化", |
300
|
|
|
|
|
|
|
"88671", "高雄", |
301
|
|
|
|
|
|
|
"88656", "嘉义\、云林", |
302
|
|
|
|
|
|
|
"88677", "高雄", |
303
|
|
|
|
|
|
|
"88644", "台中\、彰化", |
304
|
|
|
|
|
|
|
"88657", "嘉义\、云林", |
305
|
|
|
|
|
|
|
"8864007", "台中\、彰化", |
306
|
|
|
|
|
|
|
"8864009", "台中\、彰化", |
307
|
|
|
|
|
|
|
"88649", "南投", |
308
|
|
|
|
|
|
|
"88675", "高雄", |
309
|
|
|
|
|
|
|
"88637", "苗栗", |
310
|
|
|
|
|
|
|
"8864002", "台中\、彰化", |
311
|
|
|
|
|
|
|
"8868230", "屏东", |
312
|
|
|
|
|
|
|
"88655", "嘉义\、云林", |
313
|
|
|
|
|
|
|
"8864003", "台中\、彰化", |
314
|
|
|
|
|
|
|
"88678", "高雄", |
315
|
|
|
|
|
|
|
"886825", "金门", |
316
|
|
|
|
|
|
|
"88653", "嘉义\、云林", |
317
|
|
|
|
|
|
|
"88684", "屏东", |
318
|
|
|
|
|
|
|
"88673", "高雄", |
319
|
|
|
|
|
|
|
"88642", "台中\、彰化", |
320
|
|
|
|
|
|
|
"88658", "嘉义\、云林", |
321
|
|
|
|
|
|
|
"886824", "金门", |
322
|
|
|
|
|
|
|
"88641", "台中\、彰化", |
323
|
|
|
|
|
|
|
"886828", "金门", |
324
|
|
|
|
|
|
|
"88688", "屏东", |
325
|
|
|
|
|
|
|
"8864006", "台中\、彰化", |
326
|
|
|
|
|
|
|
"8864005", "台中\、彰化", |
327
|
|
|
|
|
|
|
"88654", "嘉义\、云林", |
328
|
|
|
|
|
|
|
"88647", "台中\、彰化", |
329
|
|
|
|
|
|
|
"88674", "高雄", |
330
|
|
|
|
|
|
|
"88683", "马祖", |
331
|
|
|
|
|
|
|
"8864004", "台中\、彰化", |
332
|
|
|
|
|
|
|
"886823", "金门", |
333
|
|
|
|
|
|
|
"886826", "乌丘", |
334
|
|
|
|
|
|
|
"886402", "台中\、彰化", |
335
|
|
|
|
|
|
|
"886408", "台中\、彰化", |
336
|
|
|
|
|
|
|
"8864001", "台中\、彰化", |
337
|
|
|
|
|
|
|
"8863", "桃园\、新竹\、花莲\、宜兰", |
338
|
|
|
|
|
|
|
"88679", "高雄", |
339
|
|
|
|
|
|
|
"886403", "台中\、彰化", |
340
|
|
|
|
|
|
|
"8864008", "台中\、彰化", |
341
|
|
|
|
|
|
|
"8866", "台南\、澎湖", |
342
|
|
|
|
|
|
|
"88680", "屏东", |
343
|
|
|
|
|
|
|
"886404", "台中\、彰化", |
344
|
|
|
|
|
|
|
"886827", "金门", |
345
|
|
|
|
|
|
|
"88689", "台东",}; |
346
|
|
|
|
|
|
|
$areanames{en} = {"8864007", "Taichung\/Changhua", |
347
|
|
|
|
|
|
|
"88644", "Taichung\/Changhua", |
348
|
|
|
|
|
|
|
"88657", "Chiayi\/Yunlin", |
349
|
|
|
|
|
|
|
"88677", "Kaohsiung", |
350
|
|
|
|
|
|
|
"88656", "Chiayi\/Yunlin", |
351
|
|
|
|
|
|
|
"88671", "Kaohsiung", |
352
|
|
|
|
|
|
|
"88672", "Kaohsiung", |
353
|
|
|
|
|
|
|
"88643", "Taichung\/Changhua", |
354
|
|
|
|
|
|
|
"88652", "Chiayi\/Yunlin", |
355
|
|
|
|
|
|
|
"88687", "Pingtung", |
356
|
|
|
|
|
|
|
"8862", "Taipei", |
357
|
|
|
|
|
|
|
"88648", "Taichung\/Changhua", |
358
|
|
|
|
|
|
|
"88676", "Kaohsiung", |
359
|
|
|
|
|
|
|
"88655", "Chiayi\/Yunlin", |
360
|
|
|
|
|
|
|
"8864002", "Taichung\/Changhua", |
361
|
|
|
|
|
|
|
"88637", "Miaoli", |
362
|
|
|
|
|
|
|
"88675", "Kaohsiung", |
363
|
|
|
|
|
|
|
"8864009", "Taichung\/Changhua", |
364
|
|
|
|
|
|
|
"88649", "Nantou", |
365
|
|
|
|
|
|
|
"8864004", "Taichung\/Changhua", |
366
|
|
|
|
|
|
|
"886402", "Taichung\/Changhua", |
367
|
|
|
|
|
|
|
"886826", "Wuqiu", |
368
|
|
|
|
|
|
|
"886823", "Kinmen", |
369
|
|
|
|
|
|
|
"88674", "Kaohsiung", |
370
|
|
|
|
|
|
|
"88683", "Matsu", |
371
|
|
|
|
|
|
|
"88654", "Chiayi\/Yunlin", |
372
|
|
|
|
|
|
|
"8864005", "Taichung\/Changhua", |
373
|
|
|
|
|
|
|
"88647", "Taichung\/Changhua", |
374
|
|
|
|
|
|
|
"886828", "Kinmen", |
375
|
|
|
|
|
|
|
"88688", "Pingtung", |
376
|
|
|
|
|
|
|
"8864006", "Taichung\/Changhua", |
377
|
|
|
|
|
|
|
"88658", "Chiayi\/Yunlin", |
378
|
|
|
|
|
|
|
"88641", "Taichung\/Changhua", |
379
|
|
|
|
|
|
|
"886824", "Kinmen", |
380
|
|
|
|
|
|
|
"88684", "Pingtung", |
381
|
|
|
|
|
|
|
"88673", "Kaohsiung", |
382
|
|
|
|
|
|
|
"88642", "Taichung\/Changhua", |
383
|
|
|
|
|
|
|
"88653", "Chiayi\/Yunlin", |
384
|
|
|
|
|
|
|
"88678", "Kaohsiung", |
385
|
|
|
|
|
|
|
"8864003", "Taichung\/Changhua", |
386
|
|
|
|
|
|
|
"886825", "Kinmen", |
387
|
|
|
|
|
|
|
"88689", "Taitung", |
388
|
|
|
|
|
|
|
"886827", "Kinmen", |
389
|
|
|
|
|
|
|
"886404", "Taichung\/Changhua", |
390
|
|
|
|
|
|
|
"88680", "Pingtung", |
391
|
|
|
|
|
|
|
"8864008", "Taichung\/Changhua", |
392
|
|
|
|
|
|
|
"8866", "Tainan\/Penghu", |
393
|
|
|
|
|
|
|
"886403", "Taichung\/Changhua", |
394
|
|
|
|
|
|
|
"88679", "Kaohsiung", |
395
|
|
|
|
|
|
|
"8863", "Taoyuan\/Hsinchu\/Yilan\/Hualien", |
396
|
|
|
|
|
|
|
"8864001", "Taichung\/Changhua", |
397
|
|
|
|
|
|
|
"886408", "Taichung\/Changhua",}; |
398
|
|
|
|
|
|
|
|
399
|
|
|
|
|
|
|
sub new { |
400
|
22
|
|
|
22
|
1
|
63
|
my $class = shift; |
401
|
22
|
|
|
|
|
47
|
my $number = shift; |
402
|
22
|
|
|
|
|
158
|
$number =~ s/(^\+886|\D)//g; |
403
|
22
|
|
|
|
|
121
|
my $self = bless({ country_code => '886', number => $number, formatters => $formatters, validators => $validators, areanames => \%areanames}, $class); |
404
|
22
|
100
|
|
|
|
112
|
return $self if ($self->is_valid()); |
405
|
1
|
|
|
|
|
5
|
$number =~ s/^(?:0)//; |
406
|
1
|
|
|
|
|
13
|
$self = bless({ country_code => '886', number => $number, formatters => $formatters, validators => $validators, areanames => \%areanames}, $class); |
407
|
1
|
50
|
|
|
|
6
|
return $self->is_valid() ? $self : undef; |
408
|
|
|
|
|
|
|
} |
409
|
|
|
|
|
|
|
1; |