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::InternationalNetworks882; |
20
|
3
|
|
|
3
|
|
1915
|
use base qw(Number::Phone::StubCountry); |
|
3
|
|
|
|
|
8
|
|
|
3
|
|
|
|
|
315
|
|
21
|
|
|
|
|
|
|
|
22
|
3
|
|
|
3
|
|
30
|
use strict; |
|
3
|
|
|
|
|
8
|
|
|
3
|
|
|
|
|
65
|
|
23
|
3
|
|
|
3
|
|
18
|
use warnings; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
76
|
|
24
|
3
|
|
|
3
|
|
15
|
use utf8; |
|
3
|
|
|
|
|
10
|
|
|
3
|
|
|
|
|
90
|
|
25
|
|
|
|
|
|
|
our $VERSION = 1.20230614174405; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
my $formatters = [ |
28
|
|
|
|
|
|
|
{ |
29
|
|
|
|
|
|
|
'format' => '$1 $2', |
30
|
|
|
|
|
|
|
'leading_digits' => ' |
31
|
|
|
|
|
|
|
16| |
32
|
|
|
|
|
|
|
342 |
33
|
|
|
|
|
|
|
', |
34
|
|
|
|
|
|
|
'pattern' => '(\\d{2})(\\d{5})' |
35
|
|
|
|
|
|
|
}, |
36
|
|
|
|
|
|
|
{ |
37
|
|
|
|
|
|
|
'format' => '$1 $2', |
38
|
|
|
|
|
|
|
'leading_digits' => '49', |
39
|
|
|
|
|
|
|
'pattern' => '(\\d{2})(\\d{6})' |
40
|
|
|
|
|
|
|
}, |
41
|
|
|
|
|
|
|
{ |
42
|
|
|
|
|
|
|
'format' => '$1 $2 $3', |
43
|
|
|
|
|
|
|
'leading_digits' => ' |
44
|
|
|
|
|
|
|
1[36]| |
45
|
|
|
|
|
|
|
9 |
46
|
|
|
|
|
|
|
', |
47
|
|
|
|
|
|
|
'pattern' => '(\\d{2})(\\d{2})(\\d{4})' |
48
|
|
|
|
|
|
|
}, |
49
|
|
|
|
|
|
|
{ |
50
|
|
|
|
|
|
|
'format' => '$1 $2 $3', |
51
|
|
|
|
|
|
|
'leading_digits' => '3[23]', |
52
|
|
|
|
|
|
|
'pattern' => '(\\d{2})(\\d{4})(\\d{3})' |
53
|
|
|
|
|
|
|
}, |
54
|
|
|
|
|
|
|
{ |
55
|
|
|
|
|
|
|
'format' => '$1 $2 $3', |
56
|
|
|
|
|
|
|
'leading_digits' => '16', |
57
|
|
|
|
|
|
|
'pattern' => '(\\d{2})(\\d{3,4})(\\d{4})' |
58
|
|
|
|
|
|
|
}, |
59
|
|
|
|
|
|
|
{ |
60
|
|
|
|
|
|
|
'format' => '$1 $2 $3', |
61
|
|
|
|
|
|
|
'leading_digits' => ' |
62
|
|
|
|
|
|
|
10| |
63
|
|
|
|
|
|
|
23| |
64
|
|
|
|
|
|
|
3(?: |
65
|
|
|
|
|
|
|
[15]| |
66
|
|
|
|
|
|
|
4[57] |
67
|
|
|
|
|
|
|
)| |
68
|
|
|
|
|
|
|
4| |
69
|
|
|
|
|
|
|
51 |
70
|
|
|
|
|
|
|
', |
71
|
|
|
|
|
|
|
'pattern' => '(\\d{2})(\\d{4})(\\d{4})' |
72
|
|
|
|
|
|
|
}, |
73
|
|
|
|
|
|
|
{ |
74
|
|
|
|
|
|
|
'format' => '$1 $2 $3', |
75
|
|
|
|
|
|
|
'leading_digits' => '34', |
76
|
|
|
|
|
|
|
'pattern' => '(\\d{3})(\\d{4})(\\d{4})' |
77
|
|
|
|
|
|
|
}, |
78
|
|
|
|
|
|
|
{ |
79
|
|
|
|
|
|
|
'format' => '$1 $2 $3', |
80
|
|
|
|
|
|
|
'leading_digits' => '[1-35]', |
81
|
|
|
|
|
|
|
'pattern' => '(\\d{2})(\\d{4,5})(\\d{5})' |
82
|
|
|
|
|
|
|
} |
83
|
|
|
|
|
|
|
]; |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
my $validators = { |
86
|
|
|
|
|
|
|
'fixed_line' => '', |
87
|
|
|
|
|
|
|
'geographic' => '', |
88
|
|
|
|
|
|
|
'mobile' => ' |
89
|
|
|
|
|
|
|
342\\d{4}| |
90
|
|
|
|
|
|
|
(?: |
91
|
|
|
|
|
|
|
337| |
92
|
|
|
|
|
|
|
49 |
93
|
|
|
|
|
|
|
)\\d{6}| |
94
|
|
|
|
|
|
|
(?: |
95
|
|
|
|
|
|
|
3(?: |
96
|
|
|
|
|
|
|
2| |
97
|
|
|
|
|
|
|
47| |
98
|
|
|
|
|
|
|
7\\d{3} |
99
|
|
|
|
|
|
|
)| |
100
|
|
|
|
|
|
|
50\\d{3} |
101
|
|
|
|
|
|
|
)\\d{7} |
102
|
|
|
|
|
|
|
', |
103
|
|
|
|
|
|
|
'pager' => '', |
104
|
|
|
|
|
|
|
'personal_number' => '', |
105
|
|
|
|
|
|
|
'specialrate' => '', |
106
|
|
|
|
|
|
|
'toll_free' => '', |
107
|
|
|
|
|
|
|
'voip' => ' |
108
|
|
|
|
|
|
|
1(?: |
109
|
|
|
|
|
|
|
3(?: |
110
|
|
|
|
|
|
|
0[0347]| |
111
|
|
|
|
|
|
|
[13][0139]| |
112
|
|
|
|
|
|
|
2[035]| |
113
|
|
|
|
|
|
|
4[013568]| |
114
|
|
|
|
|
|
|
6[0459]| |
115
|
|
|
|
|
|
|
7[06]| |
116
|
|
|
|
|
|
|
8[15-8]| |
117
|
|
|
|
|
|
|
9[0689] |
118
|
|
|
|
|
|
|
)\\d{4}| |
119
|
|
|
|
|
|
|
6\\d{5,10} |
120
|
|
|
|
|
|
|
)| |
121
|
|
|
|
|
|
|
(?: |
122
|
|
|
|
|
|
|
345\\d| |
123
|
|
|
|
|
|
|
9[89] |
124
|
|
|
|
|
|
|
)\\d{6}| |
125
|
|
|
|
|
|
|
(?: |
126
|
|
|
|
|
|
|
10| |
127
|
|
|
|
|
|
|
2(?: |
128
|
|
|
|
|
|
|
3| |
129
|
|
|
|
|
|
|
85\\d |
130
|
|
|
|
|
|
|
)| |
131
|
|
|
|
|
|
|
3(?: |
132
|
|
|
|
|
|
|
[15]| |
133
|
|
|
|
|
|
|
[69]\\d\\d |
134
|
|
|
|
|
|
|
)| |
135
|
|
|
|
|
|
|
4[15-8]| |
136
|
|
|
|
|
|
|
51 |
137
|
|
|
|
|
|
|
)\\d{8} |
138
|
|
|
|
|
|
|
' |
139
|
|
|
|
|
|
|
}; |
140
|
|
|
|
|
|
|
|
141
|
|
|
|
|
|
|
sub new { |
142
|
32
|
|
|
32
|
1
|
87
|
my $class = shift; |
143
|
32
|
|
|
|
|
65
|
my $number = shift; |
144
|
32
|
|
|
|
|
300
|
$number =~ s/(^\+882|\D)//g; |
145
|
32
|
|
|
|
|
195
|
my $self = bless({ country_code => '882', number => $number, formatters => $formatters, validators => $validators, }, $class); |
146
|
32
|
100
|
|
|
|
194
|
return $self->is_valid() ? $self : undef; |
147
|
|
|
|
|
|
|
} |
148
|
|
|
|
|
|
|
1; |