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::KN; |
20
|
2
|
|
|
2
|
|
1130
|
use base qw(Number::Phone::StubCountry); |
|
2
|
|
|
|
|
12
|
|
|
2
|
|
|
|
|
238
|
|
21
|
|
|
|
|
|
|
|
22
|
2
|
|
|
2
|
|
17
|
use strict; |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
50
|
|
23
|
2
|
|
|
2
|
|
14
|
use warnings; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
68
|
|
24
|
2
|
|
|
2
|
|
15
|
use utf8; |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
20
|
|
25
|
|
|
|
|
|
|
our $VERSION = 1.20230614174403; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
my $formatters = [ |
28
|
|
|
|
|
|
|
{ |
29
|
|
|
|
|
|
|
'format' => '$1-$2', |
30
|
|
|
|
|
|
|
'leading_digits' => '310', |
31
|
|
|
|
|
|
|
'pattern' => '(\\d{3})(\\d{4})' |
32
|
|
|
|
|
|
|
}, |
33
|
|
|
|
|
|
|
{ |
34
|
|
|
|
|
|
|
'format' => '$1-$2', |
35
|
|
|
|
|
|
|
'intl_format' => 'NA', |
36
|
|
|
|
|
|
|
'leading_digits' => ' |
37
|
|
|
|
|
|
|
[24-9]| |
38
|
|
|
|
|
|
|
3(?: |
39
|
|
|
|
|
|
|
[02-9]| |
40
|
|
|
|
|
|
|
1[1-9] |
41
|
|
|
|
|
|
|
) |
42
|
|
|
|
|
|
|
', |
43
|
|
|
|
|
|
|
'pattern' => '(\\d{3})(\\d{4})' |
44
|
|
|
|
|
|
|
}, |
45
|
|
|
|
|
|
|
{ |
46
|
|
|
|
|
|
|
'format' => '($1) $2-$3', |
47
|
|
|
|
|
|
|
'intl_format' => '$1-$2-$3', |
48
|
|
|
|
|
|
|
'leading_digits' => '[2-9]', |
49
|
|
|
|
|
|
|
'pattern' => '(\\d{3})(\\d{3})(\\d{4})' |
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
]; |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
my $validators = { |
54
|
|
|
|
|
|
|
'fixed_line' => ' |
55
|
|
|
|
|
|
|
869(?: |
56
|
|
|
|
|
|
|
2(?: |
57
|
|
|
|
|
|
|
29| |
58
|
|
|
|
|
|
|
36 |
59
|
|
|
|
|
|
|
)| |
60
|
|
|
|
|
|
|
302| |
61
|
|
|
|
|
|
|
4(?: |
62
|
|
|
|
|
|
|
6[015-9]| |
63
|
|
|
|
|
|
|
70 |
64
|
|
|
|
|
|
|
)| |
65
|
|
|
|
|
|
|
56[5-7] |
66
|
|
|
|
|
|
|
)\\d{4} |
67
|
|
|
|
|
|
|
', |
68
|
|
|
|
|
|
|
'geographic' => ' |
69
|
|
|
|
|
|
|
869(?: |
70
|
|
|
|
|
|
|
2(?: |
71
|
|
|
|
|
|
|
29| |
72
|
|
|
|
|
|
|
36 |
73
|
|
|
|
|
|
|
)| |
74
|
|
|
|
|
|
|
302| |
75
|
|
|
|
|
|
|
4(?: |
76
|
|
|
|
|
|
|
6[015-9]| |
77
|
|
|
|
|
|
|
70 |
78
|
|
|
|
|
|
|
)| |
79
|
|
|
|
|
|
|
56[5-7] |
80
|
|
|
|
|
|
|
)\\d{4} |
81
|
|
|
|
|
|
|
', |
82
|
|
|
|
|
|
|
'mobile' => ' |
83
|
|
|
|
|
|
|
869(?: |
84
|
|
|
|
|
|
|
48[89]| |
85
|
|
|
|
|
|
|
55[6-8]| |
86
|
|
|
|
|
|
|
66\\d| |
87
|
|
|
|
|
|
|
76[02-7] |
88
|
|
|
|
|
|
|
)\\d{4} |
89
|
|
|
|
|
|
|
', |
90
|
|
|
|
|
|
|
'pager' => '', |
91
|
|
|
|
|
|
|
'personal_number' => ' |
92
|
|
|
|
|
|
|
52(?: |
93
|
|
|
|
|
|
|
3(?: |
94
|
|
|
|
|
|
|
[2-46-9][02-9]\\d| |
95
|
|
|
|
|
|
|
5(?: |
96
|
|
|
|
|
|
|
[02-46-9]\\d| |
97
|
|
|
|
|
|
|
5[0-46-9] |
98
|
|
|
|
|
|
|
) |
99
|
|
|
|
|
|
|
)| |
100
|
|
|
|
|
|
|
4(?: |
101
|
|
|
|
|
|
|
[2-478][02-9]\\d| |
102
|
|
|
|
|
|
|
5(?: |
103
|
|
|
|
|
|
|
[034]\\d| |
104
|
|
|
|
|
|
|
2[024-9]| |
105
|
|
|
|
|
|
|
5[0-46-9] |
106
|
|
|
|
|
|
|
)| |
107
|
|
|
|
|
|
|
6(?: |
108
|
|
|
|
|
|
|
0[1-9]| |
109
|
|
|
|
|
|
|
[2-9]\\d |
110
|
|
|
|
|
|
|
)| |
111
|
|
|
|
|
|
|
9(?: |
112
|
|
|
|
|
|
|
[05-9]\\d| |
113
|
|
|
|
|
|
|
2[0-5]| |
114
|
|
|
|
|
|
|
49 |
115
|
|
|
|
|
|
|
) |
116
|
|
|
|
|
|
|
) |
117
|
|
|
|
|
|
|
)\\d{4}| |
118
|
|
|
|
|
|
|
52[34][2-9]1[02-9]\\d{4}| |
119
|
|
|
|
|
|
|
5(?: |
120
|
|
|
|
|
|
|
00| |
121
|
|
|
|
|
|
|
2[125-9]| |
122
|
|
|
|
|
|
|
33| |
123
|
|
|
|
|
|
|
44| |
124
|
|
|
|
|
|
|
66| |
125
|
|
|
|
|
|
|
77| |
126
|
|
|
|
|
|
|
88 |
127
|
|
|
|
|
|
|
)[2-9]\\d{6} |
128
|
|
|
|
|
|
|
', |
129
|
|
|
|
|
|
|
'specialrate' => '(900[2-9]\\d{6})', |
130
|
|
|
|
|
|
|
'toll_free' => ' |
131
|
|
|
|
|
|
|
8(?: |
132
|
|
|
|
|
|
|
00| |
133
|
|
|
|
|
|
|
33| |
134
|
|
|
|
|
|
|
44| |
135
|
|
|
|
|
|
|
55| |
136
|
|
|
|
|
|
|
66| |
137
|
|
|
|
|
|
|
77| |
138
|
|
|
|
|
|
|
88 |
139
|
|
|
|
|
|
|
)[2-9]\\d{6} |
140
|
|
|
|
|
|
|
', |
141
|
|
|
|
|
|
|
'voip' => '' |
142
|
|
|
|
|
|
|
}; |
143
|
2
|
|
|
2
|
|
289
|
use Number::Phone::NANP::Data; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
339
|
|
144
|
|
|
|
|
|
|
sub areaname { |
145
|
|
|
|
|
|
|
# uncoverable subroutine - no data for most NANP countries |
146
|
|
|
|
|
|
|
# uncoverable statement |
147
|
0
|
|
|
0
|
1
|
0
|
Number::Phone::NANP::Data::_areaname('1'.shift()->{number}); } |
148
|
|
|
|
|
|
|
|
149
|
|
|
|
|
|
|
sub new { |
150
|
13
|
|
|
13
|
1
|
40
|
my $class = shift; |
151
|
13
|
|
|
|
|
27
|
my $number = shift; |
152
|
13
|
|
|
|
|
124
|
$number =~ s/(^\+1|\D)//g; |
153
|
13
|
|
|
|
|
90
|
my $self = bless({ country_code => '1', number => $number, formatters => $formatters, validators => $validators, }, $class); |
154
|
13
|
100
|
|
|
|
75
|
return $self->is_valid() ? $self : undef; |
155
|
|
|
|
|
|
|
} |
156
|
|
|
|
|
|
|
1; |