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::MS; |
20
|
2
|
|
|
2
|
|
1049
|
use base qw(Number::Phone::StubCountry); |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
226
|
|
21
|
|
|
|
|
|
|
|
22
|
2
|
|
|
2
|
|
20
|
use strict; |
|
2
|
|
|
|
|
9
|
|
|
2
|
|
|
|
|
47
|
|
23
|
2
|
|
|
2
|
|
14
|
use warnings; |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
69
|
|
24
|
2
|
|
|
2
|
|
19
|
use utf8; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
12
|
|
25
|
|
|
|
|
|
|
our $VERSION = 1.20230903131448; |
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
|
|
|
|
|
|
|
6644(?: |
56
|
|
|
|
|
|
|
1[0-3]| |
57
|
|
|
|
|
|
|
91 |
58
|
|
|
|
|
|
|
)\\d{4} |
59
|
|
|
|
|
|
|
', |
60
|
|
|
|
|
|
|
'geographic' => ' |
61
|
|
|
|
|
|
|
6644(?: |
62
|
|
|
|
|
|
|
1[0-3]| |
63
|
|
|
|
|
|
|
91 |
64
|
|
|
|
|
|
|
)\\d{4} |
65
|
|
|
|
|
|
|
', |
66
|
|
|
|
|
|
|
'mobile' => ' |
67
|
|
|
|
|
|
|
664(?: |
68
|
|
|
|
|
|
|
3(?: |
69
|
|
|
|
|
|
|
49| |
70
|
|
|
|
|
|
|
9[1-6] |
71
|
|
|
|
|
|
|
)| |
72
|
|
|
|
|
|
|
49[2-6] |
73
|
|
|
|
|
|
|
)\\d{4} |
74
|
|
|
|
|
|
|
', |
75
|
|
|
|
|
|
|
'pager' => '', |
76
|
|
|
|
|
|
|
'personal_number' => ' |
77
|
|
|
|
|
|
|
52(?: |
78
|
|
|
|
|
|
|
3(?: |
79
|
|
|
|
|
|
|
[2-46-9][02-9]\\d| |
80
|
|
|
|
|
|
|
5(?: |
81
|
|
|
|
|
|
|
[02-46-9]\\d| |
82
|
|
|
|
|
|
|
5[0-46-9] |
83
|
|
|
|
|
|
|
) |
84
|
|
|
|
|
|
|
)| |
85
|
|
|
|
|
|
|
4(?: |
86
|
|
|
|
|
|
|
[2-478][02-9]\\d| |
87
|
|
|
|
|
|
|
5(?: |
88
|
|
|
|
|
|
|
[034]\\d| |
89
|
|
|
|
|
|
|
2[024-9]| |
90
|
|
|
|
|
|
|
5[0-46-9] |
91
|
|
|
|
|
|
|
)| |
92
|
|
|
|
|
|
|
6(?: |
93
|
|
|
|
|
|
|
0[1-9]| |
94
|
|
|
|
|
|
|
[2-9]\\d |
95
|
|
|
|
|
|
|
)| |
96
|
|
|
|
|
|
|
9(?: |
97
|
|
|
|
|
|
|
[05-9]\\d| |
98
|
|
|
|
|
|
|
2[0-5]| |
99
|
|
|
|
|
|
|
49 |
100
|
|
|
|
|
|
|
) |
101
|
|
|
|
|
|
|
) |
102
|
|
|
|
|
|
|
)\\d{4}| |
103
|
|
|
|
|
|
|
52[34][2-9]1[02-9]\\d{4}| |
104
|
|
|
|
|
|
|
5(?: |
105
|
|
|
|
|
|
|
00| |
106
|
|
|
|
|
|
|
2[125-9]| |
107
|
|
|
|
|
|
|
33| |
108
|
|
|
|
|
|
|
44| |
109
|
|
|
|
|
|
|
66| |
110
|
|
|
|
|
|
|
77| |
111
|
|
|
|
|
|
|
88 |
112
|
|
|
|
|
|
|
)[2-9]\\d{6} |
113
|
|
|
|
|
|
|
', |
114
|
|
|
|
|
|
|
'specialrate' => '(900[2-9]\\d{6})', |
115
|
|
|
|
|
|
|
'toll_free' => ' |
116
|
|
|
|
|
|
|
8(?: |
117
|
|
|
|
|
|
|
00| |
118
|
|
|
|
|
|
|
33| |
119
|
|
|
|
|
|
|
44| |
120
|
|
|
|
|
|
|
55| |
121
|
|
|
|
|
|
|
66| |
122
|
|
|
|
|
|
|
77| |
123
|
|
|
|
|
|
|
88 |
124
|
|
|
|
|
|
|
)[2-9]\\d{6} |
125
|
|
|
|
|
|
|
', |
126
|
|
|
|
|
|
|
'voip' => '' |
127
|
|
|
|
|
|
|
}; |
128
|
2
|
|
|
2
|
|
310
|
use Number::Phone::NANP::Data; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
363
|
|
129
|
|
|
|
|
|
|
sub areaname { |
130
|
|
|
|
|
|
|
# uncoverable subroutine - no data for most NANP countries |
131
|
|
|
|
|
|
|
# uncoverable statement |
132
|
0
|
|
|
0
|
1
|
0
|
Number::Phone::NANP::Data::_areaname('1'.shift()->{number}); } |
133
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
sub new { |
135
|
13
|
|
|
13
|
1
|
34
|
my $class = shift; |
136
|
13
|
|
|
|
|
25
|
my $number = shift; |
137
|
13
|
|
|
|
|
93
|
$number =~ s/(^\+1|\D)//g; |
138
|
13
|
|
|
|
|
69
|
my $self = bless({ country_code => '1', number => $number, formatters => $formatters, validators => $validators, }, $class); |
139
|
13
|
100
|
|
|
|
75
|
return $self->is_valid() ? $self : undef; |
140
|
|
|
|
|
|
|
} |
141
|
|
|
|
|
|
|
1; |