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

filter: Statementstmt 100% 22 / 22 Branchbran 100% 2 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod 100% 1 / 1 totaltotal 100% 30 / 30 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/OM.pm ↑ Summary blib/lib/Number/Phone/StubCountry/PF.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::PA;
20 2 ▶use base qw(Number::Phone::StubCountry);
Subroutine BEGIN: called CC=1 SCAR=0.0
21  
22 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
23 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
24 2 ▶use utf8;
Subroutine BEGIN: called CC=1 SCAR=0.0
25 2 our $VERSION = 1.20260904101551;
26  
27 2 my $formatters = [
28 {
29 'format' => '$1-$2',
30 'leading_digits' => '[1-57-9]',
31 'pattern' => '(\\d{3})(\\d{4})'
32 },
33 {
34 'format' => '$1-$2',
35 'leading_digits' => '[68]',
36 'pattern' => '(\\d{4})(\\d{4})'
37 },
38 {
39 'format' => '$1 $2 $3',
40 'leading_digits' => '8',
41 'pattern' => '(\\d{3})(\\d{3})(\\d{4})'
42 }
43 ];
44  
45 2 my $validators = {
46 'fixed_line' => '
47 (?:
48 1(?:
49 0\\d|
50 1[0479]|
51 2[37]|
52 3[0137]|
53 4[147]|
54 5[05]|
55 6[058]|
56 7[0167]|
57 8[2358]|
58 9[1389]
59 )|
60 2(?:
61 [0235-79]\\d|
62 1[0-7]|
63 4[013-9]|
64 8[02-9]
65 )|
66 3(?:
67 [0147-9]\\d|
68 [25][0-5]|
69 33|
70 6[068]
71 )|
72 4(?:
73 00|
74 3[0-579]|
75 4\\d|
76 7[0-57-9]
77 )|
78 5(?:
79 [01]\\d|
80 2[0-7]|
81 [56]0|
82 79
83 )|
84 7(?:
85 0[09]|
86 2[0-26-8]|
87 3[03]|
88 4[04]|
89 5[05-9]|
90 6[0156]|
91 7[0-24-9]|
92 8[4-9]|
93 90
94 )|
95 8(?:
96 09|
97 2[89]|
98 3\\d|
99 4[0-24-689]|
100 5[014]|
101 8[02]
102 )|
103 9(?:
104 0[5-9]|
105 1[0135-8]|
106 2[036-9]|
107 3[35-79]|
108 40|
109 5[0457-9]|
110 6[05-9]|
111 7[04-9]|
112 8[35-8]|
113 9\\d
114 )
115 )\\d{4}
116 ',
117 'geographic' => '
118 (?:
119 1(?:
120 0\\d|
121 1[0479]|
122 2[37]|
123 3[0137]|
124 4[147]|
125 5[05]|
126 6[058]|
127 7[0167]|
128 8[2358]|
129 9[1389]
130 )|
131 2(?:
132 [0235-79]\\d|
133 1[0-7]|
134 4[013-9]|
135 8[02-9]
136 )|
137 3(?:
138 [0147-9]\\d|
139 [25][0-5]|
140 33|
141 6[068]
142 )|
143 4(?:
144 00|
145 3[0-579]|
146 4\\d|
147 7[0-57-9]
148 )|
149 5(?:
150 [01]\\d|
151 2[0-7]|
152 [56]0|
153 79
154 )|
155 7(?:
156 0[09]|
157 2[0-26-8]|
158 3[03]|
159 4[04]|
160 5[05-9]|
161 6[0156]|
162 7[0-24-9]|
163 8[4-9]|
164 90
165 )|
166 8(?:
167 09|
168 2[89]|
169 3\\d|
170 4[0-24-689]|
171 5[014]|
172 8[02]
173 )|
174 9(?:
175 0[5-9]|
176 1[0135-8]|
177 2[036-9]|
178 3[35-79]|
179 40|
180 5[0457-9]|
181 6[05-9]|
182 7[04-9]|
183 8[35-8]|
184 9\\d
185 )
186 )\\d{4}
187 ',
188 'mobile' => '
189 (?:
190 1[16]1|
191 21[89]|
192 6\\d{3}|
193 8(?:
194 1[01]|
195 7[23]
196 )
197 )\\d{4}
198 ',
199 'pager' => '',
200 'personal_number' => '',
201 'specialrate' => '(
202 (?:
203 8(?:
204 22|
205 55|
206 60|
207 7[78]|
208 86
209 )|
210 9(?:
211 00|
212 81
213 )
214 )\\d{4}
215 )',
216 'toll_free' => '
217 800\\d{4,5}|
218 (?:
219 00800|
220 800\\d
221 )\\d{6}
222 ',
223 'voip' => ''
224 };
225 2 my $timezones = {
226 '' => [
227 'America/Panama'
228 ]
229 };
230  
231 13 ▶ sub new {
Subroutine new: called CC=2 SCAR=6.9
Pod documented
232 13 my $class = shift;
233 13 my $number = shift;
234 13 $number =~ s/(^\+507|\D)//g;
235 13 my $self = bless({ country_code => '507', number => $number, formatters => $formatters, validators => $validators, timezones => $timezones, }, $class);
236 13 ▶ return $self->is_valid() ? $self : undef;
Branch: 1 branch
BranchTrueFalseTotal
$self->is_valid ? : 12 1 13
237 }
238 2 1;
« blib/lib/Number/Phone/StubCountry/OM.pm ↑ Summary blib/lib/Number/Phone/StubCountry/PF.pm »