blib/lib/Number/Phone/StubCountry/CW.pm

filter: Statementstmt 100% 24 / 24 Branchbran 100% 2 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod 100% 1 / 1 totaltotal 100% 32 / 32 CC 2 SCAR 2.9
CC
2
Cov
100%
new
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.3
« blib/lib/Number/Phone/StubCountry/CV.pm ↑ Summary blib/lib/Number/Phone/StubCountry/CY.pm »
1 # automatically generated file, don't edit
2  
3  
4  
5 # Copyright 2026 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 ▶use base qw(Number::Phone::StubCountry);
Subroutine BEGIN: called CC=1 SCAR=0.0
21  
22 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
23 3 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
24 3 ▶use utf8;
Subroutine BEGIN: called CC=1 SCAR=0.0
25 3 our $VERSION = 1.20260904101549;
26  
27 3 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 3 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 3 my %areanames = ();
103 3 $areanames{en} = {"5994160", "Saba",
104 "5994162", "Saba",
105 "5994163", "Saba",
106 "59975", "Bonaire",
107 "59971", "Bonaire",
108 "59972", "Bonaire",
109 "5993183", "St\.\ Eustatius",
110 "5993180", "St\.\ Eustatius",
111 "5993182", "St\.\ Eustatius",
112 "599417", "Saba",};
113 3 my $timezones = {
114 '' => [
115 'America/Curacao',
116 'America/Kralendijk'
117 ],
118 '3' => [
119 'America/Kralendijk'
120 ],
121 '4' => [
122 'America/Kralendijk'
123 ],
124 '6' => [
125 'America/Curacao'
126 ],
127 '7' => [
128 'America/Kralendijk'
129 ],
130 '9' => [
131 'America/Curacao'
132 ]
133 };
134  
135 19 ▶ sub new {
Subroutine new: called CC=2 SCAR=6.9
Pod documented
136 19 my $class = shift;
137 19 my $number = shift;
138 19 $number =~ s/(^\+599|\D)//g;
139 19 my $self = bless({ country_code => '599', number => $number, formatters => $formatters, validators => $validators, timezones => $timezones, areanames => \%areanames}, $class);
140 19 ▶ return $self->is_valid() ? $self : undef;
Branch: 1 branch
BranchTrueFalseTotal
$self->is_valid ? : 15 4 19
141 }
142 3 1;
« blib/lib/Number/Phone/StubCountry/CV.pm ↑ Summary blib/lib/Number/Phone/StubCountry/CY.pm »