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::PW; |
20
|
2
|
|
|
2
|
|
1376
|
use base qw(Number::Phone::StubCountry); |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
263
|
|
21
|
|
|
|
|
|
|
|
22
|
2
|
|
|
2
|
|
16
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
57
|
|
23
|
2
|
|
|
2
|
|
14
|
use warnings; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
64
|
|
24
|
2
|
|
|
2
|
|
22
|
use utf8; |
|
2
|
|
|
|
|
16
|
|
|
2
|
|
|
|
|
14
|
|
25
|
|
|
|
|
|
|
our $VERSION = 1.20230903131448; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
my $formatters = [ |
28
|
|
|
|
|
|
|
{ |
29
|
|
|
|
|
|
|
'format' => '$1 $2', |
30
|
|
|
|
|
|
|
'leading_digits' => '[2-9]', |
31
|
|
|
|
|
|
|
'pattern' => '(\\d{3})(\\d{4})' |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
]; |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
my $validators = { |
36
|
|
|
|
|
|
|
'fixed_line' => ' |
37
|
|
|
|
|
|
|
(?: |
38
|
|
|
|
|
|
|
2(?: |
39
|
|
|
|
|
|
|
55| |
40
|
|
|
|
|
|
|
77 |
41
|
|
|
|
|
|
|
)| |
42
|
|
|
|
|
|
|
345| |
43
|
|
|
|
|
|
|
488| |
44
|
|
|
|
|
|
|
5(?: |
45
|
|
|
|
|
|
|
35| |
46
|
|
|
|
|
|
|
44| |
47
|
|
|
|
|
|
|
87 |
48
|
|
|
|
|
|
|
)| |
49
|
|
|
|
|
|
|
6(?: |
50
|
|
|
|
|
|
|
22| |
51
|
|
|
|
|
|
|
54| |
52
|
|
|
|
|
|
|
79 |
53
|
|
|
|
|
|
|
)| |
54
|
|
|
|
|
|
|
7(?: |
55
|
|
|
|
|
|
|
33| |
56
|
|
|
|
|
|
|
47 |
57
|
|
|
|
|
|
|
)| |
58
|
|
|
|
|
|
|
8(?: |
59
|
|
|
|
|
|
|
24| |
60
|
|
|
|
|
|
|
55| |
61
|
|
|
|
|
|
|
76 |
62
|
|
|
|
|
|
|
)| |
63
|
|
|
|
|
|
|
900 |
64
|
|
|
|
|
|
|
)\\d{4} |
65
|
|
|
|
|
|
|
', |
66
|
|
|
|
|
|
|
'geographic' => ' |
67
|
|
|
|
|
|
|
(?: |
68
|
|
|
|
|
|
|
2(?: |
69
|
|
|
|
|
|
|
55| |
70
|
|
|
|
|
|
|
77 |
71
|
|
|
|
|
|
|
)| |
72
|
|
|
|
|
|
|
345| |
73
|
|
|
|
|
|
|
488| |
74
|
|
|
|
|
|
|
5(?: |
75
|
|
|
|
|
|
|
35| |
76
|
|
|
|
|
|
|
44| |
77
|
|
|
|
|
|
|
87 |
78
|
|
|
|
|
|
|
)| |
79
|
|
|
|
|
|
|
6(?: |
80
|
|
|
|
|
|
|
22| |
81
|
|
|
|
|
|
|
54| |
82
|
|
|
|
|
|
|
79 |
83
|
|
|
|
|
|
|
)| |
84
|
|
|
|
|
|
|
7(?: |
85
|
|
|
|
|
|
|
33| |
86
|
|
|
|
|
|
|
47 |
87
|
|
|
|
|
|
|
)| |
88
|
|
|
|
|
|
|
8(?: |
89
|
|
|
|
|
|
|
24| |
90
|
|
|
|
|
|
|
55| |
91
|
|
|
|
|
|
|
76 |
92
|
|
|
|
|
|
|
)| |
93
|
|
|
|
|
|
|
900 |
94
|
|
|
|
|
|
|
)\\d{4} |
95
|
|
|
|
|
|
|
', |
96
|
|
|
|
|
|
|
'mobile' => ' |
97
|
|
|
|
|
|
|
(?: |
98
|
|
|
|
|
|
|
(?: |
99
|
|
|
|
|
|
|
46| |
100
|
|
|
|
|
|
|
83 |
101
|
|
|
|
|
|
|
)[0-5]| |
102
|
|
|
|
|
|
|
6[2-4689]0 |
103
|
|
|
|
|
|
|
)\\d{4}| |
104
|
|
|
|
|
|
|
(?: |
105
|
|
|
|
|
|
|
45| |
106
|
|
|
|
|
|
|
77| |
107
|
|
|
|
|
|
|
88 |
108
|
|
|
|
|
|
|
)\\d{5} |
109
|
|
|
|
|
|
|
', |
110
|
|
|
|
|
|
|
'pager' => '', |
111
|
|
|
|
|
|
|
'personal_number' => '', |
112
|
|
|
|
|
|
|
'specialrate' => '', |
113
|
|
|
|
|
|
|
'toll_free' => '', |
114
|
|
|
|
|
|
|
'voip' => '' |
115
|
|
|
|
|
|
|
}; |
116
|
|
|
|
|
|
|
my %areanames = (); |
117
|
|
|
|
|
|
|
$areanames{en} = {"68082", "Ngaraard\ State", |
118
|
|
|
|
|
|
|
"68074", "Ngardmau\ State", |
119
|
|
|
|
|
|
|
"68054", "Aimeliik\ State", |
120
|
|
|
|
|
|
|
"68027", "Angaur\ State", |
121
|
|
|
|
|
|
|
"68025", "Sonsorol\ State\ and\ Hatohobei\ State", |
122
|
|
|
|
|
|
|
"68058", "Airai\ State", |
123
|
|
|
|
|
|
|
"68073", "Ngaremlengui\ State", |
124
|
|
|
|
|
|
|
"680622", "Ngchesar\ State", |
125
|
|
|
|
|
|
|
"68087", "Kayangel\ State", |
126
|
|
|
|
|
|
|
"68053", "Ngatpang\ State", |
127
|
|
|
|
|
|
|
"68065", "Melekeok\ State", |
128
|
|
|
|
|
|
|
"68067", "Ngiwal\ State", |
129
|
|
|
|
|
|
|
"68085", "Ngarchelong\ State", |
130
|
|
|
|
|
|
|
"6803", "Peleliu\ State", |
131
|
|
|
|
|
|
|
"68048", "Koror\ State",}; |
132
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
sub new { |
134
|
7
|
|
|
7
|
1
|
19
|
my $class = shift; |
135
|
7
|
|
|
|
|
14
|
my $number = shift; |
136
|
7
|
|
|
|
|
43
|
$number =~ s/(^\+680|\D)//g; |
137
|
7
|
|
|
|
|
40
|
my $self = bless({ country_code => '680', number => $number, formatters => $formatters, validators => $validators, areanames => \%areanames}, $class); |
138
|
7
|
100
|
|
|
|
40
|
return $self->is_valid() ? $self : undef; |
139
|
|
|
|
|
|
|
} |
140
|
|
|
|
|
|
|
1; |