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::MK; |
20
|
2
|
|
|
2
|
|
1184
|
use base qw(Number::Phone::StubCountry); |
|
2
|
|
|
|
|
10
|
|
|
2
|
|
|
|
|
210
|
|
21
|
|
|
|
|
|
|
|
22
|
2
|
|
|
2
|
|
17
|
use strict; |
|
2
|
|
|
|
|
10
|
|
|
2
|
|
|
|
|
49
|
|
23
|
2
|
|
|
2
|
|
13
|
use warnings; |
|
2
|
|
|
|
|
8
|
|
|
2
|
|
|
|
|
52
|
|
24
|
2
|
|
|
2
|
|
11
|
use utf8; |
|
2
|
|
|
|
|
10
|
|
|
2
|
|
|
|
|
13
|
|
25
|
|
|
|
|
|
|
our $VERSION = 1.20230903131448; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
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-48]\\d| |
143
|
|
|
|
|
|
|
7[01578] |
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
|
|
|
|
|
|
|
my %areanames = (); |
169
|
|
|
|
|
|
|
$areanames{en} = {"389475", "Bitola\/Demir\ Hisar\/Resen", |
170
|
|
|
|
|
|
|
"3894869", "Prilep\/Krusevo", |
171
|
|
|
|
|
|
|
"3894762", "Bitola\/Demir\ Hisar\/Resen", |
172
|
|
|
|
|
|
|
"38943", "Veles\/Kavadarci\/Negotino", |
173
|
|
|
|
|
|
|
"38942", "Gostivar", |
174
|
|
|
|
|
|
|
"389488", "Prilep\/Krusevo", |
175
|
|
|
|
|
|
|
"389474", "Bitola\/Demir\ Hisar\/Resen", |
176
|
|
|
|
|
|
|
"3894768", "Bitola\/Demir\ Hisar\/Resen", |
177
|
|
|
|
|
|
|
"38946", "Ohrid\/Struga\/Debar", |
178
|
|
|
|
|
|
|
"3894861", "Prilep\/Krusevo", |
179
|
|
|
|
|
|
|
"3892", "Skopje", |
180
|
|
|
|
|
|
|
"389478", "Bitola\/Demir\ Hisar\/Resen", |
181
|
|
|
|
|
|
|
"3894769", "Bitola\/Demir\ Hisar\/Resen", |
182
|
|
|
|
|
|
|
"3894862", "Prilep\/Krusevo", |
183
|
|
|
|
|
|
|
"389485", "Prilep\/Krusevo", |
184
|
|
|
|
|
|
|
"38944", "Tetovo", |
185
|
|
|
|
|
|
|
"3894761", "Bitola\/Demir\ Hisar\/Resen", |
186
|
|
|
|
|
|
|
"3894868", "Prilep\/Krusevo", |
187
|
|
|
|
|
|
|
"389484", "Prilep\/Krusevo", |
188
|
|
|
|
|
|
|
"38931", "Kumanovo\/Kriva\ Palanka\/Kratovo", |
189
|
|
|
|
|
|
|
"3894767", "Bitola\/Demir\ Hisar\/Resen", |
190
|
|
|
|
|
|
|
"3894764", "Bitola\/Demir\ Hisar\/Resen", |
191
|
|
|
|
|
|
|
"38932", "Stip\/Probistip\/Sveti\ Nikole\/Radovis", |
192
|
|
|
|
|
|
|
"38933", "Kocani\/Berovo\/Delcevo\/Vinica", |
193
|
|
|
|
|
|
|
"38947600", "Bitola\/Demir\ Hisar\/Resen", |
194
|
|
|
|
|
|
|
"3894766", "Bitola\/Demir\ Hisar\/Resen", |
195
|
|
|
|
|
|
|
"3894765", "Bitola\/Demir\ Hisar\/Resen", |
196
|
|
|
|
|
|
|
"389472", "Bitola\/Demir\ Hisar\/Resen", |
197
|
|
|
|
|
|
|
"3894863", "Prilep\/Krusevo", |
198
|
|
|
|
|
|
|
"3894864", "Prilep\/Krusevo", |
199
|
|
|
|
|
|
|
"3894867", "Prilep\/Krusevo", |
200
|
|
|
|
|
|
|
"38934", "Gevgelija\/Valandovo\/Strumica\/Dojran", |
201
|
|
|
|
|
|
|
"38947608", "Bitola\/Demir\ Hisar\/Resen", |
202
|
|
|
|
|
|
|
"3894763", "Bitola\/Demir\ Hisar\/Resen", |
203
|
|
|
|
|
|
|
"3894865", "Prilep\/Krusevo", |
204
|
|
|
|
|
|
|
"38947609", "Bitola\/Demir\ Hisar\/Resen", |
205
|
|
|
|
|
|
|
"389477", "Bitola\/Demir\ Hisar\/Resen", |
206
|
|
|
|
|
|
|
"3894866", "Prilep\/Krusevo", |
207
|
|
|
|
|
|
|
"38945", "Kicevo\/Makedonski\ Brod",}; |
208
|
|
|
|
|
|
|
|
209
|
|
|
|
|
|
|
sub new { |
210
|
16
|
|
|
16
|
1
|
35
|
my $class = shift; |
211
|
16
|
|
|
|
|
39
|
my $number = shift; |
212
|
16
|
|
|
|
|
106
|
$number =~ s/(^\+389|\D)//g; |
213
|
16
|
|
|
|
|
134
|
my $self = bless({ country_code => '389', number => $number, formatters => $formatters, validators => $validators, areanames => \%areanames}, $class); |
214
|
16
|
100
|
|
|
|
81
|
return $self if ($self->is_valid()); |
215
|
1
|
|
|
|
|
11
|
$number =~ s/^(?:0)//; |
216
|
1
|
|
|
|
|
11
|
$self = bless({ country_code => '389', number => $number, formatters => $formatters, validators => $validators, areanames => \%areanames}, $class); |
217
|
1
|
50
|
|
|
|
5
|
return $self->is_valid() ? $self : undef; |
218
|
|
|
|
|
|
|
} |
219
|
|
|
|
|
|
|
1; |