| 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::SB; |
|
20
|
2
|
|
|
2
|
|
1225
|
use base qw(Number::Phone::StubCountry); |
|
|
2
|
|
|
|
|
8
|
|
|
|
2
|
|
|
|
|
237
|
|
|
21
|
|
|
|
|
|
|
|
|
22
|
2
|
|
|
2
|
|
17
|
use strict; |
|
|
2
|
|
|
|
|
15
|
|
|
|
2
|
|
|
|
|
75
|
|
|
23
|
2
|
|
|
2
|
|
23
|
use warnings; |
|
|
2
|
|
|
|
|
6
|
|
|
|
2
|
|
|
|
|
127
|
|
|
24
|
2
|
|
|
2
|
|
21
|
use utf8; |
|
|
2
|
|
|
|
|
5
|
|
|
|
2
|
|
|
|
|
10
|
|
|
25
|
|
|
|
|
|
|
our $VERSION = 1.20230614174404; |
|
26
|
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
my $formatters = [ |
|
28
|
|
|
|
|
|
|
{ |
|
29
|
|
|
|
|
|
|
'format' => '$1 $2', |
|
30
|
|
|
|
|
|
|
'leading_digits' => ' |
|
31
|
|
|
|
|
|
|
7| |
|
32
|
|
|
|
|
|
|
8[4-9]| |
|
33
|
|
|
|
|
|
|
9(?: |
|
34
|
|
|
|
|
|
|
[1-8]| |
|
35
|
|
|
|
|
|
|
9[0-8] |
|
36
|
|
|
|
|
|
|
) |
|
37
|
|
|
|
|
|
|
', |
|
38
|
|
|
|
|
|
|
'pattern' => '(\\d{2})(\\d{5})' |
|
39
|
|
|
|
|
|
|
} |
|
40
|
|
|
|
|
|
|
]; |
|
41
|
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
my $validators = { |
|
43
|
|
|
|
|
|
|
'fixed_line' => ' |
|
44
|
|
|
|
|
|
|
(?: |
|
45
|
|
|
|
|
|
|
1[4-79]| |
|
46
|
|
|
|
|
|
|
[23]\\d| |
|
47
|
|
|
|
|
|
|
4[0-2]| |
|
48
|
|
|
|
|
|
|
5[03]| |
|
49
|
|
|
|
|
|
|
6[0-37] |
|
50
|
|
|
|
|
|
|
)\\d{3} |
|
51
|
|
|
|
|
|
|
', |
|
52
|
|
|
|
|
|
|
'geographic' => ' |
|
53
|
|
|
|
|
|
|
(?: |
|
54
|
|
|
|
|
|
|
1[4-79]| |
|
55
|
|
|
|
|
|
|
[23]\\d| |
|
56
|
|
|
|
|
|
|
4[0-2]| |
|
57
|
|
|
|
|
|
|
5[03]| |
|
58
|
|
|
|
|
|
|
6[0-37] |
|
59
|
|
|
|
|
|
|
)\\d{3} |
|
60
|
|
|
|
|
|
|
', |
|
61
|
|
|
|
|
|
|
'mobile' => ' |
|
62
|
|
|
|
|
|
|
48\\d{3}| |
|
63
|
|
|
|
|
|
|
(?: |
|
64
|
|
|
|
|
|
|
(?: |
|
65
|
|
|
|
|
|
|
7[1-9]| |
|
66
|
|
|
|
|
|
|
8[4-9] |
|
67
|
|
|
|
|
|
|
)\\d| |
|
68
|
|
|
|
|
|
|
9(?: |
|
69
|
|
|
|
|
|
|
1[2-9]| |
|
70
|
|
|
|
|
|
|
2[013-9]| |
|
71
|
|
|
|
|
|
|
3[0-2]| |
|
72
|
|
|
|
|
|
|
[46]\\d| |
|
73
|
|
|
|
|
|
|
5[0-46-9]| |
|
74
|
|
|
|
|
|
|
7[0-689]| |
|
75
|
|
|
|
|
|
|
8[0-79]| |
|
76
|
|
|
|
|
|
|
9[0-8] |
|
77
|
|
|
|
|
|
|
) |
|
78
|
|
|
|
|
|
|
)\\d{4} |
|
79
|
|
|
|
|
|
|
', |
|
80
|
|
|
|
|
|
|
'pager' => '', |
|
81
|
|
|
|
|
|
|
'personal_number' => '', |
|
82
|
|
|
|
|
|
|
'specialrate' => '', |
|
83
|
|
|
|
|
|
|
'toll_free' => '1[38]\\d{3}', |
|
84
|
|
|
|
|
|
|
'voip' => '5[12]\\d{3}' |
|
85
|
|
|
|
|
|
|
}; |
|
86
|
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
sub new { |
|
88
|
13
|
|
|
13
|
1
|
46
|
my $class = shift; |
|
89
|
13
|
|
|
|
|
21
|
my $number = shift; |
|
90
|
13
|
|
|
|
|
79
|
$number =~ s/(^\+677|\D)//g; |
|
91
|
13
|
|
|
|
|
70
|
my $self = bless({ country_code => '677', number => $number, formatters => $formatters, validators => $validators, }, $class); |
|
92
|
13
|
100
|
|
|
|
73
|
return $self->is_valid() ? $self : undef; |
|
93
|
|
|
|
|
|
|
} |
|
94
|
|
|
|
|
|
|
1; |