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