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