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
|
|
1184
|
use base qw(Number::Phone::StubCountry); |
|
2
|
|
|
|
|
8
|
|
|
2
|
|
|
|
|
266
|
|
21
|
|
|
|
|
|
|
|
22
|
2
|
|
|
2
|
|
16
|
use strict; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
76
|
|
23
|
2
|
|
|
2
|
|
16
|
use warnings; |
|
2
|
|
|
|
|
8
|
|
|
2
|
|
|
|
|
59
|
|
24
|
2
|
|
|
2
|
|
12
|
use utf8; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
22
|
|
25
|
|
|
|
|
|
|
our $VERSION = 1.20230614174401; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
my $formatters = [ |
28
|
|
|
|
|
|
|
{ |
29
|
|
|
|
|
|
|
'format' => '$1 $2', |
30
|
|
|
|
|
|
|
'leading_digits' => ' |
31
|
|
|
|
|
|
|
[13679]| |
32
|
|
|
|
|
|
|
8[047] |
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
|
|
|
|
|
|
|
1(?: |
60
|
|
|
|
|
|
|
11| |
61
|
|
|
|
|
|
|
78 |
62
|
|
|
|
|
|
|
)| |
63
|
|
|
|
|
|
|
7\\d\\d |
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
|
|
|
|
|
|
|
1(?: |
88
|
|
|
|
|
|
|
11| |
89
|
|
|
|
|
|
|
78 |
90
|
|
|
|
|
|
|
)| |
91
|
|
|
|
|
|
|
7\\d\\d |
92
|
|
|
|
|
|
|
) |
93
|
|
|
|
|
|
|
)\\d{4} |
94
|
|
|
|
|
|
|
', |
95
|
|
|
|
|
|
|
'mobile' => ' |
96
|
|
|
|
|
|
|
(?: |
97
|
|
|
|
|
|
|
3(?: |
98
|
|
|
|
|
|
|
[1-79]\\d| |
99
|
|
|
|
|
|
|
8[0-47-9] |
100
|
|
|
|
|
|
|
)\\d| |
101
|
|
|
|
|
|
|
6(?: |
102
|
|
|
|
|
|
|
3(?: |
103
|
|
|
|
|
|
|
00| |
104
|
|
|
|
|
|
|
33| |
105
|
|
|
|
|
|
|
6[16] |
106
|
|
|
|
|
|
|
)| |
107
|
|
|
|
|
|
|
6(?: |
108
|
|
|
|
|
|
|
3[03-9]| |
109
|
|
|
|
|
|
|
[69]\\d| |
110
|
|
|
|
|
|
|
7[0-6] |
111
|
|
|
|
|
|
|
) |
112
|
|
|
|
|
|
|
) |
113
|
|
|
|
|
|
|
)\\d{4} |
114
|
|
|
|
|
|
|
', |
115
|
|
|
|
|
|
|
'pager' => '', |
116
|
|
|
|
|
|
|
'personal_number' => '', |
117
|
|
|
|
|
|
|
'specialrate' => '(84\\d{6})|( |
118
|
|
|
|
|
|
|
(?: |
119
|
|
|
|
|
|
|
87| |
120
|
|
|
|
|
|
|
9[014578] |
121
|
|
|
|
|
|
|
)\\d{6} |
122
|
|
|
|
|
|
|
)', |
123
|
|
|
|
|
|
|
'toll_free' => '80\\d{6}', |
124
|
|
|
|
|
|
|
'voip' => '' |
125
|
|
|
|
|
|
|
}; |
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
sub new { |
128
|
16
|
|
|
16
|
1
|
34
|
my $class = shift; |
129
|
16
|
|
|
|
|
25
|
my $number = shift; |
130
|
16
|
|
|
|
|
95
|
$number =~ s/(^\+973|\D)//g; |
131
|
16
|
|
|
|
|
85
|
my $self = bless({ country_code => '973', number => $number, formatters => $formatters, validators => $validators, }, $class); |
132
|
16
|
100
|
|
|
|
77
|
return $self->is_valid() ? $self : undef; |
133
|
|
|
|
|
|
|
} |
134
|
|
|
|
|
|
|
1; |