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::BM; |
20
|
2
|
|
|
2
|
|
1010
|
use base qw(Number::Phone::StubCountry); |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
212
|
|
21
|
|
|
|
|
|
|
|
22
|
2
|
|
|
2
|
|
15
|
use strict; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
49
|
|
23
|
2
|
|
|
2
|
|
51
|
use warnings; |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
68
|
|
24
|
2
|
|
|
2
|
|
13
|
use utf8; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
10
|
|
25
|
|
|
|
|
|
|
our $VERSION = 1.20230903131443; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
my $formatters = [ |
28
|
|
|
|
|
|
|
{ |
29
|
|
|
|
|
|
|
'format' => '$1-$2', |
30
|
|
|
|
|
|
|
'leading_digits' => '310', |
31
|
|
|
|
|
|
|
'pattern' => '(\\d{3})(\\d{4})' |
32
|
|
|
|
|
|
|
}, |
33
|
|
|
|
|
|
|
{ |
34
|
|
|
|
|
|
|
'format' => '$1-$2', |
35
|
|
|
|
|
|
|
'intl_format' => 'NA', |
36
|
|
|
|
|
|
|
'leading_digits' => ' |
37
|
|
|
|
|
|
|
[24-9]| |
38
|
|
|
|
|
|
|
3(?: |
39
|
|
|
|
|
|
|
[02-9]| |
40
|
|
|
|
|
|
|
1[1-9] |
41
|
|
|
|
|
|
|
) |
42
|
|
|
|
|
|
|
', |
43
|
|
|
|
|
|
|
'pattern' => '(\\d{3})(\\d{4})' |
44
|
|
|
|
|
|
|
}, |
45
|
|
|
|
|
|
|
{ |
46
|
|
|
|
|
|
|
'format' => '($1) $2-$3', |
47
|
|
|
|
|
|
|
'intl_format' => '$1-$2-$3', |
48
|
|
|
|
|
|
|
'leading_digits' => '[2-9]', |
49
|
|
|
|
|
|
|
'pattern' => '(\\d{3})(\\d{3})(\\d{4})' |
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
]; |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
my $validators = { |
54
|
|
|
|
|
|
|
'fixed_line' => ' |
55
|
|
|
|
|
|
|
441(?: |
56
|
|
|
|
|
|
|
[46]\\d\\d| |
57
|
|
|
|
|
|
|
5(?: |
58
|
|
|
|
|
|
|
4\\d| |
59
|
|
|
|
|
|
|
60| |
60
|
|
|
|
|
|
|
89 |
61
|
|
|
|
|
|
|
) |
62
|
|
|
|
|
|
|
)\\d{4} |
63
|
|
|
|
|
|
|
', |
64
|
|
|
|
|
|
|
'geographic' => ' |
65
|
|
|
|
|
|
|
441(?: |
66
|
|
|
|
|
|
|
[46]\\d\\d| |
67
|
|
|
|
|
|
|
5(?: |
68
|
|
|
|
|
|
|
4\\d| |
69
|
|
|
|
|
|
|
60| |
70
|
|
|
|
|
|
|
89 |
71
|
|
|
|
|
|
|
) |
72
|
|
|
|
|
|
|
)\\d{4} |
73
|
|
|
|
|
|
|
', |
74
|
|
|
|
|
|
|
'mobile' => ' |
75
|
|
|
|
|
|
|
441(?: |
76
|
|
|
|
|
|
|
[2378]\\d| |
77
|
|
|
|
|
|
|
5[0-39]| |
78
|
|
|
|
|
|
|
92 |
79
|
|
|
|
|
|
|
)\\d{5} |
80
|
|
|
|
|
|
|
', |
81
|
|
|
|
|
|
|
'pager' => '', |
82
|
|
|
|
|
|
|
'personal_number' => ' |
83
|
|
|
|
|
|
|
52(?: |
84
|
|
|
|
|
|
|
3(?: |
85
|
|
|
|
|
|
|
[2-46-9][02-9]\\d| |
86
|
|
|
|
|
|
|
5(?: |
87
|
|
|
|
|
|
|
[02-46-9]\\d| |
88
|
|
|
|
|
|
|
5[0-46-9] |
89
|
|
|
|
|
|
|
) |
90
|
|
|
|
|
|
|
)| |
91
|
|
|
|
|
|
|
4(?: |
92
|
|
|
|
|
|
|
[2-478][02-9]\\d| |
93
|
|
|
|
|
|
|
5(?: |
94
|
|
|
|
|
|
|
[034]\\d| |
95
|
|
|
|
|
|
|
2[024-9]| |
96
|
|
|
|
|
|
|
5[0-46-9] |
97
|
|
|
|
|
|
|
)| |
98
|
|
|
|
|
|
|
6(?: |
99
|
|
|
|
|
|
|
0[1-9]| |
100
|
|
|
|
|
|
|
[2-9]\\d |
101
|
|
|
|
|
|
|
)| |
102
|
|
|
|
|
|
|
9(?: |
103
|
|
|
|
|
|
|
[05-9]\\d| |
104
|
|
|
|
|
|
|
2[0-5]| |
105
|
|
|
|
|
|
|
49 |
106
|
|
|
|
|
|
|
) |
107
|
|
|
|
|
|
|
) |
108
|
|
|
|
|
|
|
)\\d{4}| |
109
|
|
|
|
|
|
|
52[34][2-9]1[02-9]\\d{4}| |
110
|
|
|
|
|
|
|
5(?: |
111
|
|
|
|
|
|
|
00| |
112
|
|
|
|
|
|
|
2[125-9]| |
113
|
|
|
|
|
|
|
33| |
114
|
|
|
|
|
|
|
44| |
115
|
|
|
|
|
|
|
66| |
116
|
|
|
|
|
|
|
77| |
117
|
|
|
|
|
|
|
88 |
118
|
|
|
|
|
|
|
)[2-9]\\d{6} |
119
|
|
|
|
|
|
|
', |
120
|
|
|
|
|
|
|
'specialrate' => '(900[2-9]\\d{6})', |
121
|
|
|
|
|
|
|
'toll_free' => ' |
122
|
|
|
|
|
|
|
8(?: |
123
|
|
|
|
|
|
|
00| |
124
|
|
|
|
|
|
|
33| |
125
|
|
|
|
|
|
|
44| |
126
|
|
|
|
|
|
|
55| |
127
|
|
|
|
|
|
|
66| |
128
|
|
|
|
|
|
|
77| |
129
|
|
|
|
|
|
|
88 |
130
|
|
|
|
|
|
|
)[2-9]\\d{6} |
131
|
|
|
|
|
|
|
', |
132
|
|
|
|
|
|
|
'voip' => '' |
133
|
|
|
|
|
|
|
}; |
134
|
2
|
|
|
2
|
|
270
|
use Number::Phone::NANP::Data; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
360
|
|
135
|
|
|
|
|
|
|
sub areaname { |
136
|
|
|
|
|
|
|
# uncoverable subroutine - no data for most NANP countries |
137
|
|
|
|
|
|
|
# uncoverable statement |
138
|
0
|
|
|
0
|
1
|
0
|
Number::Phone::NANP::Data::_areaname('1'.shift()->{number}); } |
139
|
|
|
|
|
|
|
|
140
|
|
|
|
|
|
|
sub new { |
141
|
13
|
|
|
13
|
1
|
31
|
my $class = shift; |
142
|
13
|
|
|
|
|
20
|
my $number = shift; |
143
|
13
|
|
|
|
|
85
|
$number =~ s/(^\+1|\D)//g; |
144
|
13
|
|
|
|
|
73
|
my $self = bless({ country_code => '1', number => $number, formatters => $formatters, validators => $validators, }, $class); |
145
|
13
|
100
|
|
|
|
66
|
return $self->is_valid() ? $self : undef; |
146
|
|
|
|
|
|
|
} |
147
|
|
|
|
|
|
|
1; |