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::KW; |
20
|
2
|
|
|
2
|
|
1067
|
use base qw(Number::Phone::StubCountry); |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
214
|
|
21
|
|
|
|
|
|
|
|
22
|
2
|
|
|
2
|
|
17
|
use strict; |
|
2
|
|
|
|
|
8
|
|
|
2
|
|
|
|
|
58
|
|
23
|
2
|
|
|
2
|
|
11
|
use warnings; |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
47
|
|
24
|
2
|
|
|
2
|
|
11
|
use utf8; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
10
|
|
25
|
|
|
|
|
|
|
our $VERSION = 1.20230307181421; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
my $formatters = [ |
28
|
|
|
|
|
|
|
{ |
29
|
|
|
|
|
|
|
'format' => '$1 $2', |
30
|
|
|
|
|
|
|
'leading_digits' => ' |
31
|
|
|
|
|
|
|
[169]| |
32
|
|
|
|
|
|
|
2(?: |
33
|
|
|
|
|
|
|
[235]| |
34
|
|
|
|
|
|
|
4[1-35-9] |
35
|
|
|
|
|
|
|
)| |
36
|
|
|
|
|
|
|
52 |
37
|
|
|
|
|
|
|
', |
38
|
|
|
|
|
|
|
'pattern' => '(\\d{4})(\\d{3,4})' |
39
|
|
|
|
|
|
|
}, |
40
|
|
|
|
|
|
|
{ |
41
|
|
|
|
|
|
|
'format' => '$1 $2', |
42
|
|
|
|
|
|
|
'leading_digits' => '[245]', |
43
|
|
|
|
|
|
|
'pattern' => '(\\d{3})(\\d{5})' |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
]; |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
my $validators = { |
48
|
|
|
|
|
|
|
'fixed_line' => ' |
49
|
|
|
|
|
|
|
2(?: |
50
|
|
|
|
|
|
|
[23]\\d\\d| |
51
|
|
|
|
|
|
|
4(?: |
52
|
|
|
|
|
|
|
[1-35-9]\\d| |
53
|
|
|
|
|
|
|
44 |
54
|
|
|
|
|
|
|
)| |
55
|
|
|
|
|
|
|
5(?: |
56
|
|
|
|
|
|
|
0[034]| |
57
|
|
|
|
|
|
|
[2-46]\\d| |
58
|
|
|
|
|
|
|
5[1-3]| |
59
|
|
|
|
|
|
|
7[1-7] |
60
|
|
|
|
|
|
|
) |
61
|
|
|
|
|
|
|
)\\d{4} |
62
|
|
|
|
|
|
|
', |
63
|
|
|
|
|
|
|
'geographic' => ' |
64
|
|
|
|
|
|
|
2(?: |
65
|
|
|
|
|
|
|
[23]\\d\\d| |
66
|
|
|
|
|
|
|
4(?: |
67
|
|
|
|
|
|
|
[1-35-9]\\d| |
68
|
|
|
|
|
|
|
44 |
69
|
|
|
|
|
|
|
)| |
70
|
|
|
|
|
|
|
5(?: |
71
|
|
|
|
|
|
|
0[034]| |
72
|
|
|
|
|
|
|
[2-46]\\d| |
73
|
|
|
|
|
|
|
5[1-3]| |
74
|
|
|
|
|
|
|
7[1-7] |
75
|
|
|
|
|
|
|
) |
76
|
|
|
|
|
|
|
)\\d{4} |
77
|
|
|
|
|
|
|
', |
78
|
|
|
|
|
|
|
'mobile' => ' |
79
|
|
|
|
|
|
|
(?: |
80
|
|
|
|
|
|
|
41\\d\\d| |
81
|
|
|
|
|
|
|
5(?: |
82
|
|
|
|
|
|
|
(?: |
83
|
|
|
|
|
|
|
[05]\\d| |
84
|
|
|
|
|
|
|
1[0-7]| |
85
|
|
|
|
|
|
|
6[56] |
86
|
|
|
|
|
|
|
)\\d| |
87
|
|
|
|
|
|
|
2(?: |
88
|
|
|
|
|
|
|
22| |
89
|
|
|
|
|
|
|
5[25] |
90
|
|
|
|
|
|
|
)| |
91
|
|
|
|
|
|
|
7(?: |
92
|
|
|
|
|
|
|
55| |
93
|
|
|
|
|
|
|
77 |
94
|
|
|
|
|
|
|
)| |
95
|
|
|
|
|
|
|
88[58] |
96
|
|
|
|
|
|
|
)| |
97
|
|
|
|
|
|
|
6(?: |
98
|
|
|
|
|
|
|
(?: |
99
|
|
|
|
|
|
|
0[034679]| |
100
|
|
|
|
|
|
|
5[015-9]| |
101
|
|
|
|
|
|
|
6\\d |
102
|
|
|
|
|
|
|
)\\d| |
103
|
|
|
|
|
|
|
1(?: |
104
|
|
|
|
|
|
|
00| |
105
|
|
|
|
|
|
|
11| |
106
|
|
|
|
|
|
|
66 |
107
|
|
|
|
|
|
|
)| |
108
|
|
|
|
|
|
|
222| |
109
|
|
|
|
|
|
|
3[36]3| |
110
|
|
|
|
|
|
|
444| |
111
|
|
|
|
|
|
|
7(?: |
112
|
|
|
|
|
|
|
0[013-9]| |
113
|
|
|
|
|
|
|
[67]\\d |
114
|
|
|
|
|
|
|
)| |
115
|
|
|
|
|
|
|
888| |
116
|
|
|
|
|
|
|
9(?: |
117
|
|
|
|
|
|
|
[069]\\d| |
118
|
|
|
|
|
|
|
3[039] |
119
|
|
|
|
|
|
|
) |
120
|
|
|
|
|
|
|
)| |
121
|
|
|
|
|
|
|
9(?: |
122
|
|
|
|
|
|
|
(?: |
123
|
|
|
|
|
|
|
0[09]| |
124
|
|
|
|
|
|
|
22| |
125
|
|
|
|
|
|
|
[4679]\\d| |
126
|
|
|
|
|
|
|
8[057-9] |
127
|
|
|
|
|
|
|
)\\d| |
128
|
|
|
|
|
|
|
1(?: |
129
|
|
|
|
|
|
|
1[01]| |
130
|
|
|
|
|
|
|
99 |
131
|
|
|
|
|
|
|
)| |
132
|
|
|
|
|
|
|
3(?: |
133
|
|
|
|
|
|
|
00| |
134
|
|
|
|
|
|
|
33 |
135
|
|
|
|
|
|
|
)| |
136
|
|
|
|
|
|
|
5(?: |
137
|
|
|
|
|
|
|
00| |
138
|
|
|
|
|
|
|
5\\d |
139
|
|
|
|
|
|
|
) |
140
|
|
|
|
|
|
|
) |
141
|
|
|
|
|
|
|
)\\d{4} |
142
|
|
|
|
|
|
|
', |
143
|
|
|
|
|
|
|
'pager' => '', |
144
|
|
|
|
|
|
|
'personal_number' => '', |
145
|
|
|
|
|
|
|
'specialrate' => '', |
146
|
|
|
|
|
|
|
'toll_free' => '18\\d{5}', |
147
|
|
|
|
|
|
|
'voip' => '' |
148
|
|
|
|
|
|
|
}; |
149
|
|
|
|
|
|
|
|
150
|
|
|
|
|
|
|
sub new { |
151
|
10
|
|
|
10
|
1
|
28
|
my $class = shift; |
152
|
10
|
|
|
|
|
17
|
my $number = shift; |
153
|
10
|
|
|
|
|
61
|
$number =~ s/(^\+965|\D)//g; |
154
|
10
|
|
|
|
|
46
|
my $self = bless({ country_code => '965', number => $number, formatters => $formatters, validators => $validators, }, $class); |
155
|
10
|
100
|
|
|
|
47
|
return $self->is_valid() ? $self : undef; |
156
|
|
|
|
|
|
|
} |
157
|
|
|
|
|
|
|
1; |