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::BH; |
20
|
2
|
|
|
2
|
|
1238
|
use base qw(Number::Phone::StubCountry); |
|
2
|
|
|
|
|
9
|
|
|
2
|
|
|
|
|
248
|
|
21
|
|
|
|
|
|
|
|
22
|
2
|
|
|
2
|
|
19
|
use strict; |
|
2
|
|
|
|
|
10
|
|
|
2
|
|
|
|
|
54
|
|
23
|
2
|
|
|
2
|
|
14
|
use warnings; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
61
|
|
24
|
2
|
|
|
2
|
|
13
|
use utf8; |
|
2
|
|
|
|
|
8
|
|
|
2
|
|
|
|
|
19
|
|
25
|
|
|
|
|
|
|
our $VERSION = 1.20230903131441; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
my $formatters = [ |
28
|
|
|
|
|
|
|
{ |
29
|
|
|
|
|
|
|
'format' => '$1 $2', |
30
|
|
|
|
|
|
|
'leading_digits' => ' |
31
|
|
|
|
|
|
|
[13679]| |
32
|
|
|
|
|
|
|
8[02-4679] |
33
|
|
|
|
|
|
|
', |
34
|
|
|
|
|
|
|
'pattern' => '(\\d{4})(\\d{4})' |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
]; |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
my $validators = { |
39
|
|
|
|
|
|
|
'fixed_line' => ' |
40
|
|
|
|
|
|
|
(?: |
41
|
|
|
|
|
|
|
1(?: |
42
|
|
|
|
|
|
|
3[1356]| |
43
|
|
|
|
|
|
|
6[0156]| |
44
|
|
|
|
|
|
|
7\\d |
45
|
|
|
|
|
|
|
)\\d| |
46
|
|
|
|
|
|
|
6(?: |
47
|
|
|
|
|
|
|
1[16]\\d| |
48
|
|
|
|
|
|
|
500| |
49
|
|
|
|
|
|
|
6(?: |
50
|
|
|
|
|
|
|
0\\d| |
51
|
|
|
|
|
|
|
3[12]| |
52
|
|
|
|
|
|
|
44| |
53
|
|
|
|
|
|
|
7[7-9]| |
54
|
|
|
|
|
|
|
88 |
55
|
|
|
|
|
|
|
)| |
56
|
|
|
|
|
|
|
9[69][69] |
57
|
|
|
|
|
|
|
)| |
58
|
|
|
|
|
|
|
7(?: |
59
|
|
|
|
|
|
|
[07]\\d\\d| |
60
|
|
|
|
|
|
|
1(?: |
61
|
|
|
|
|
|
|
11| |
62
|
|
|
|
|
|
|
78 |
63
|
|
|
|
|
|
|
) |
64
|
|
|
|
|
|
|
) |
65
|
|
|
|
|
|
|
)\\d{4} |
66
|
|
|
|
|
|
|
', |
67
|
|
|
|
|
|
|
'geographic' => ' |
68
|
|
|
|
|
|
|
(?: |
69
|
|
|
|
|
|
|
1(?: |
70
|
|
|
|
|
|
|
3[1356]| |
71
|
|
|
|
|
|
|
6[0156]| |
72
|
|
|
|
|
|
|
7\\d |
73
|
|
|
|
|
|
|
)\\d| |
74
|
|
|
|
|
|
|
6(?: |
75
|
|
|
|
|
|
|
1[16]\\d| |
76
|
|
|
|
|
|
|
500| |
77
|
|
|
|
|
|
|
6(?: |
78
|
|
|
|
|
|
|
0\\d| |
79
|
|
|
|
|
|
|
3[12]| |
80
|
|
|
|
|
|
|
44| |
81
|
|
|
|
|
|
|
7[7-9]| |
82
|
|
|
|
|
|
|
88 |
83
|
|
|
|
|
|
|
)| |
84
|
|
|
|
|
|
|
9[69][69] |
85
|
|
|
|
|
|
|
)| |
86
|
|
|
|
|
|
|
7(?: |
87
|
|
|
|
|
|
|
[07]\\d\\d| |
88
|
|
|
|
|
|
|
1(?: |
89
|
|
|
|
|
|
|
11| |
90
|
|
|
|
|
|
|
78 |
91
|
|
|
|
|
|
|
) |
92
|
|
|
|
|
|
|
) |
93
|
|
|
|
|
|
|
)\\d{4} |
94
|
|
|
|
|
|
|
', |
95
|
|
|
|
|
|
|
'mobile' => ' |
96
|
|
|
|
|
|
|
(?: |
97
|
|
|
|
|
|
|
3(?: |
98
|
|
|
|
|
|
|
[0-79]\\d| |
99
|
|
|
|
|
|
|
8[0-57-9] |
100
|
|
|
|
|
|
|
)\\d| |
101
|
|
|
|
|
|
|
6(?: |
102
|
|
|
|
|
|
|
3(?: |
103
|
|
|
|
|
|
|
00| |
104
|
|
|
|
|
|
|
33| |
105
|
|
|
|
|
|
|
6[16] |
106
|
|
|
|
|
|
|
)| |
107
|
|
|
|
|
|
|
441| |
108
|
|
|
|
|
|
|
6(?: |
109
|
|
|
|
|
|
|
3[03-9]| |
110
|
|
|
|
|
|
|
[69]\\d| |
111
|
|
|
|
|
|
|
7[0-6] |
112
|
|
|
|
|
|
|
) |
113
|
|
|
|
|
|
|
) |
114
|
|
|
|
|
|
|
)\\d{4} |
115
|
|
|
|
|
|
|
', |
116
|
|
|
|
|
|
|
'pager' => '', |
117
|
|
|
|
|
|
|
'personal_number' => '', |
118
|
|
|
|
|
|
|
'specialrate' => '(84\\d{6})|( |
119
|
|
|
|
|
|
|
(?: |
120
|
|
|
|
|
|
|
87| |
121
|
|
|
|
|
|
|
9[0-8] |
122
|
|
|
|
|
|
|
)\\d{6} |
123
|
|
|
|
|
|
|
)', |
124
|
|
|
|
|
|
|
'toll_free' => '8[02369]\\d{6}', |
125
|
|
|
|
|
|
|
'voip' => '' |
126
|
|
|
|
|
|
|
}; |
127
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
sub new { |
129
|
16
|
|
|
16
|
1
|
37
|
my $class = shift; |
130
|
16
|
|
|
|
|
32
|
my $number = shift; |
131
|
16
|
|
|
|
|
99
|
$number =~ s/(^\+973|\D)//g; |
132
|
16
|
|
|
|
|
88
|
my $self = bless({ country_code => '973', number => $number, formatters => $formatters, validators => $validators, }, $class); |
133
|
16
|
100
|
|
|
|
67
|
return $self->is_valid() ? $self : undef; |
134
|
|
|
|
|
|
|
} |
135
|
|
|
|
|
|
|
1; |