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::CW; |
20
|
3
|
|
|
3
|
|
1790
|
use base qw(Number::Phone::StubCountry); |
|
3
|
|
|
|
|
14
|
|
|
3
|
|
|
|
|
335
|
|
21
|
|
|
|
|
|
|
|
22
|
3
|
|
|
3
|
|
26
|
use strict; |
|
3
|
|
|
|
|
18
|
|
|
3
|
|
|
|
|
64
|
|
23
|
3
|
|
|
3
|
|
26
|
use warnings; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
96
|
|
24
|
3
|
|
|
3
|
|
22
|
use utf8; |
|
3
|
|
|
|
|
9
|
|
|
3
|
|
|
|
|
17
|
|
25
|
|
|
|
|
|
|
our $VERSION = 1.20230307181419; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
my $formatters = [ |
28
|
|
|
|
|
|
|
{ |
29
|
|
|
|
|
|
|
'format' => '$1 $2', |
30
|
|
|
|
|
|
|
'leading_digits' => '[3467]', |
31
|
|
|
|
|
|
|
'pattern' => '(\\d{3})(\\d{4})' |
32
|
|
|
|
|
|
|
}, |
33
|
|
|
|
|
|
|
{ |
34
|
|
|
|
|
|
|
'format' => '$1 $2 $3', |
35
|
|
|
|
|
|
|
'leading_digits' => '9[4-8]', |
36
|
|
|
|
|
|
|
'pattern' => '(\\d)(\\d{3})(\\d{4})' |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
]; |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
my $validators = { |
41
|
|
|
|
|
|
|
'fixed_line' => ' |
42
|
|
|
|
|
|
|
9(?: |
43
|
|
|
|
|
|
|
4(?: |
44
|
|
|
|
|
|
|
3[0-5]| |
45
|
|
|
|
|
|
|
4[14]| |
46
|
|
|
|
|
|
|
6\\d |
47
|
|
|
|
|
|
|
)| |
48
|
|
|
|
|
|
|
50\\d| |
49
|
|
|
|
|
|
|
7(?: |
50
|
|
|
|
|
|
|
2[014]| |
51
|
|
|
|
|
|
|
3[02-9]| |
52
|
|
|
|
|
|
|
4[4-9]| |
53
|
|
|
|
|
|
|
6[357]| |
54
|
|
|
|
|
|
|
77| |
55
|
|
|
|
|
|
|
8[7-9] |
56
|
|
|
|
|
|
|
)| |
57
|
|
|
|
|
|
|
8(?: |
58
|
|
|
|
|
|
|
3[39]| |
59
|
|
|
|
|
|
|
[46]\\d| |
60
|
|
|
|
|
|
|
7[01]| |
61
|
|
|
|
|
|
|
8[57-9] |
62
|
|
|
|
|
|
|
) |
63
|
|
|
|
|
|
|
)\\d{4} |
64
|
|
|
|
|
|
|
', |
65
|
|
|
|
|
|
|
'geographic' => ' |
66
|
|
|
|
|
|
|
9(?: |
67
|
|
|
|
|
|
|
4(?: |
68
|
|
|
|
|
|
|
3[0-5]| |
69
|
|
|
|
|
|
|
4[14]| |
70
|
|
|
|
|
|
|
6\\d |
71
|
|
|
|
|
|
|
)| |
72
|
|
|
|
|
|
|
50\\d| |
73
|
|
|
|
|
|
|
7(?: |
74
|
|
|
|
|
|
|
2[014]| |
75
|
|
|
|
|
|
|
3[02-9]| |
76
|
|
|
|
|
|
|
4[4-9]| |
77
|
|
|
|
|
|
|
6[357]| |
78
|
|
|
|
|
|
|
77| |
79
|
|
|
|
|
|
|
8[7-9] |
80
|
|
|
|
|
|
|
)| |
81
|
|
|
|
|
|
|
8(?: |
82
|
|
|
|
|
|
|
3[39]| |
83
|
|
|
|
|
|
|
[46]\\d| |
84
|
|
|
|
|
|
|
7[01]| |
85
|
|
|
|
|
|
|
8[57-9] |
86
|
|
|
|
|
|
|
) |
87
|
|
|
|
|
|
|
)\\d{4} |
88
|
|
|
|
|
|
|
', |
89
|
|
|
|
|
|
|
'mobile' => ' |
90
|
|
|
|
|
|
|
953[01]\\d{4}| |
91
|
|
|
|
|
|
|
9(?: |
92
|
|
|
|
|
|
|
5[12467]| |
93
|
|
|
|
|
|
|
6[5-9] |
94
|
|
|
|
|
|
|
)\\d{5} |
95
|
|
|
|
|
|
|
', |
96
|
|
|
|
|
|
|
'pager' => '955\\d{5}', |
97
|
|
|
|
|
|
|
'personal_number' => '', |
98
|
|
|
|
|
|
|
'specialrate' => '(60[0-2]\\d{4})', |
99
|
|
|
|
|
|
|
'toll_free' => '', |
100
|
|
|
|
|
|
|
'voip' => '' |
101
|
|
|
|
|
|
|
}; |
102
|
|
|
|
|
|
|
my %areanames = (); |
103
|
|
|
|
|
|
|
$areanames{en} = {"59975", "Bonaire", |
104
|
|
|
|
|
|
|
"59971", "Bonaire", |
105
|
|
|
|
|
|
|
"5994162", "Saba", |
106
|
|
|
|
|
|
|
"599417", "Saba", |
107
|
|
|
|
|
|
|
"5994163", "Saba", |
108
|
|
|
|
|
|
|
"59972", "Bonaire", |
109
|
|
|
|
|
|
|
"5994160", "Saba", |
110
|
|
|
|
|
|
|
"5993180", "St\.\ Eustatius", |
111
|
|
|
|
|
|
|
"5993182", "St\.\ Eustatius", |
112
|
|
|
|
|
|
|
"5993183", "St\.\ Eustatius",}; |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
sub new { |
115
|
19
|
|
|
19
|
1
|
39
|
my $class = shift; |
116
|
19
|
|
|
|
|
57
|
my $number = shift; |
117
|
19
|
|
|
|
|
114
|
$number =~ s/(^\+599|\D)//g; |
118
|
19
|
|
|
|
|
114
|
my $self = bless({ country_code => '599', number => $number, formatters => $formatters, validators => $validators, areanames => \%areanames}, $class); |
119
|
19
|
100
|
|
|
|
83
|
return $self->is_valid() ? $self : undef; |
120
|
|
|
|
|
|
|
} |
121
|
|
|
|
|
|
|
1; |