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

filter: Statementstmt 100% 27 / 27 Branchbran 75.0% 3 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod 100% 1 / 1 totaltotal 97.3% 36 / 37 CC 3 SCAR 6.2
CC
3
Cov
97%
new
3.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.9
« blib/lib/Number/Phone/StubCountry/ME.pm ↑ Summary blib/lib/Number/Phone/StubCountry/MM.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::MK;
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.20260904101550;
26  
27 2 my $formatters = [
28 {
29 'format' => '$1 $2 $3',
30 'leading_digits' => '
31 2|
32 34[47]|
33 4(?:
34 [37]7|
35 5[47]|
36 64
37 )
38 ',
39 'national_rule' => '0$1',
40 'pattern' => '(\\d)(\\d{3})(\\d{4})'
41 },
42 {
43 'format' => '$1 $2 $3',
44 'leading_digits' => '[347]',
45 'national_rule' => '0$1',
46 'pattern' => '(\\d{2})(\\d{3})(\\d{3})'
47 },
48 {
49 'format' => '$1 $2 $3 $4',
50 'leading_digits' => '[58]',
51 'national_rule' => '0$1',
52 'pattern' => '(\\d{3})(\\d)(\\d{2})(\\d{2})'
53 }
54 ];
55  
56 2 my $validators = {
57 'fixed_line' => '
58 (?:
59 (?:
60 2(?:
61 62|
62 77
63 )0|
64 3444
65 )\\d|
66 4[56]440
67 )\\d{3}|
68 (?:
69 34|
70 4[357]
71 )700\\d{3}|
72 (?:
73 2(?:
74 [0-3]\\d|
75 5[0-578]|
76 6[01]|
77 82
78 )|
79 3(?:
80 1[3-68]|
81 [23][2-68]|
82 4[23568]
83 )|
84 4(?:
85 [23][2-68]|
86 4[3-68]|
87 5[2568]|
88 6[25-8]|
89 7[24-68]|
90 8[4-68]
91 )
92 )\\d{5}
93 ',
94 'geographic' => '
95 (?:
96 (?:
97 2(?:
98 62|
99 77
100 )0|
101 3444
102 )\\d|
103 4[56]440
104 )\\d{3}|
105 (?:
106 34|
107 4[357]
108 )700\\d{3}|
109 (?:
110 2(?:
111 [0-3]\\d|
112 5[0-578]|
113 6[01]|
114 82
115 )|
116 3(?:
117 1[3-68]|
118 [23][2-68]|
119 4[23568]
120 )|
121 4(?:
122 [23][2-68]|
123 4[3-68]|
124 5[2568]|
125 6[25-8]|
126 7[24-68]|
127 8[4-68]
128 )
129 )\\d{5}
130 ',
131 'mobile' => '
132 7(?:
133 3555|
134 (?:
135 474|
136 9[019]7
137 )7
138 )\\d{3}|
139 7(?:
140 [0-25-8]\\d\\d|
141 3(?:
142 [1-478]\\d|
143 6[01]
144 )|
145 4(?:
146 2\\d|
147 60|
148 7[01578]
149 )|
150 9(?:
151 [2-4]\\d|
152 5[01]|
153 7[015]
154 )
155 )\\d{4}
156 ',
157 'pager' => '',
158 'personal_number' => '',
159 'specialrate' => '(
160 8(?:
161 0[1-9]|
162 [1-9]\\d
163 )\\d{5}
164 )|(5\\d{7})',
165 'toll_free' => '800\\d{5}',
166 'voip' => ''
167 };
168 2 my %areanames = ();
169 2 $areanames{en} = {"3894768", "Bitola\/Demir\ Hisar\/Resen",
170 "3894764", "Bitola\/Demir\ Hisar\/Resen",
171 "3894862", "Prilep\/Krusevo",
172 "38947609", "Bitola\/Demir\ Hisar\/Resen",
173 "3894766", "Bitola\/Demir\ Hisar\/Resen",
174 "389475", "Bitola\/Demir\ Hisar\/Resen",
175 "3894765", "Bitola\/Demir\ Hisar\/Resen",
176 "3894767", "Bitola\/Demir\ Hisar\/Resen",
177 "38944", "Tetovo",
178 "389484", "Prilep\/Krusevo",
179 "3894863", "Prilep\/Krusevo",
180 "38943", "Veles\/Kavadarci\/Negotino",
181 "3894769", "Bitola\/Demir\ Hisar\/Resen",
182 "389488", "Prilep\/Krusevo",
183 "3894761", "Bitola\/Demir\ Hisar\/Resen",
184 "38942", "Gostivar",
185 "38947608", "Bitola\/Demir\ Hisar\/Resen",
186 "38946", "Ohrid\/Struga\/Debar",
187 "3894869", "Prilep\/Krusevo",
188 "389478", "Bitola\/Demir\ Hisar\/Resen",
189 "3894861", "Prilep\/Krusevo",
190 "38931", "Kumanovo\/Kriva\ Palanka\/Kratovo",
191 "389477", "Bitola\/Demir\ Hisar\/Resen",
192 "389474", "Bitola\/Demir\ Hisar\/Resen",
193 "389472", "Bitola\/Demir\ Hisar\/Resen",
194 "3894867", "Prilep\/Krusevo",
195 "3894865", "Prilep\/Krusevo",
196 "38945", "Kicevo\/Makedonski\ Brod",
197 "3894763", "Bitola\/Demir\ Hisar\/Resen",
198 "38933", "Kocani\/Berovo\/Delcevo\/Vinica",
199 "38932", "Stip\/Probistip\/Sveti\ Nikole\/Radovis",
200 "38947600", "Bitola\/Demir\ Hisar\/Resen",
201 "38934", "Gevgelija\/Valandovo\/Strumica\/Dojran",
202 "3894868", "Prilep\/Krusevo",
203 "3894864", "Prilep\/Krusevo",
204 "3894762", "Bitola\/Demir\ Hisar\/Resen",
205 "3892", "Skopje",
206 "389485", "Prilep\/Krusevo",
207 "3894866", "Prilep\/Krusevo",};
208 2 my $timezones = {
209 '' => [
210 'Europe/Skopje'
211 ]
212 };
213  
214 16 ▶ sub new {
Subroutine new: called CC=3 SCAR=11.0
Pod documented
215 16 my $class = shift;
216 16 my $number = shift;
217 16 $number =~ s/(^\+389|\D)//g;
218 16 my $self = bless({ country_code => '389', number => $number, formatters => $formatters, validators => $validators, timezones => $timezones, areanames => \%areanames}, $class);
219 16 ▶ return $self if ($self->is_valid());
Branch: 1 branch
BranchTrueFalseTotal
if $self->is_valid 15 1 16
220 1 $number =~ s/^(?:0)//;
221 1 $self = bless({ country_code => '389', number => $number, formatters => $formatters, validators => $validators, areanames => \%areanames}, $class);
222 1 ▶ return $self->is_valid() ? $self : undef;
Branch: 1 branch
BranchTrueFalseTotal
$self->is_valid ? : 0 1 1
223 }
224 2 1;
« blib/lib/Number/Phone/StubCountry/ME.pm ↑ Summary blib/lib/Number/Phone/StubCountry/MM.pm »