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::AZ; |
20
|
2
|
|
|
2
|
|
1235
|
use base qw(Number::Phone::StubCountry); |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
248
|
|
21
|
|
|
|
|
|
|
|
22
|
2
|
|
|
2
|
|
18
|
use strict; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
51
|
|
23
|
2
|
|
|
2
|
|
20
|
use warnings; |
|
2
|
|
|
|
|
8
|
|
|
2
|
|
|
|
|
59
|
|
24
|
2
|
|
|
2
|
|
19
|
use utf8; |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
15
|
|
25
|
|
|
|
|
|
|
our $VERSION = 1.20230903131441; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
my $formatters = [ |
28
|
|
|
|
|
|
|
{ |
29
|
|
|
|
|
|
|
'format' => '$1 $2 $3', |
30
|
|
|
|
|
|
|
'intl_format' => 'NA', |
31
|
|
|
|
|
|
|
'leading_digits' => '[1-9]', |
32
|
|
|
|
|
|
|
'pattern' => '(\\d{3})(\\d{2})(\\d{2})' |
33
|
|
|
|
|
|
|
}, |
34
|
|
|
|
|
|
|
{ |
35
|
|
|
|
|
|
|
'format' => '$1 $2 $3 $4', |
36
|
|
|
|
|
|
|
'leading_digits' => '90', |
37
|
|
|
|
|
|
|
'national_rule' => '0$1', |
38
|
|
|
|
|
|
|
'pattern' => '(\\d{3})(\\d{2})(\\d{2})(\\d{2})' |
39
|
|
|
|
|
|
|
}, |
40
|
|
|
|
|
|
|
{ |
41
|
|
|
|
|
|
|
'format' => '$1 $2 $3 $4', |
42
|
|
|
|
|
|
|
'leading_digits' => ' |
43
|
|
|
|
|
|
|
1[28]| |
44
|
|
|
|
|
|
|
2| |
45
|
|
|
|
|
|
|
365(?: |
46
|
|
|
|
|
|
|
4| |
47
|
|
|
|
|
|
|
5[02] |
48
|
|
|
|
|
|
|
)| |
49
|
|
|
|
|
|
|
46 |
50
|
|
|
|
|
|
|
', |
51
|
|
|
|
|
|
|
'national_rule' => '(0$1)', |
52
|
|
|
|
|
|
|
'pattern' => '(\\d{2})(\\d{3})(\\d{2})(\\d{2})' |
53
|
|
|
|
|
|
|
}, |
54
|
|
|
|
|
|
|
{ |
55
|
|
|
|
|
|
|
'format' => '$1 $2 $3 $4', |
56
|
|
|
|
|
|
|
'leading_digits' => '[13-9]', |
57
|
|
|
|
|
|
|
'national_rule' => '0$1', |
58
|
|
|
|
|
|
|
'pattern' => '(\\d{2})(\\d{3})(\\d{2})(\\d{2})' |
59
|
|
|
|
|
|
|
} |
60
|
|
|
|
|
|
|
]; |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
my $validators = { |
63
|
|
|
|
|
|
|
'fixed_line' => ' |
64
|
|
|
|
|
|
|
(?: |
65
|
|
|
|
|
|
|
2[12]428| |
66
|
|
|
|
|
|
|
3655[02] |
67
|
|
|
|
|
|
|
)\\d{4}| |
68
|
|
|
|
|
|
|
(?: |
69
|
|
|
|
|
|
|
2(?: |
70
|
|
|
|
|
|
|
22[0-79]| |
71
|
|
|
|
|
|
|
63[0-28] |
72
|
|
|
|
|
|
|
)| |
73
|
|
|
|
|
|
|
3654 |
74
|
|
|
|
|
|
|
)\\d{5}| |
75
|
|
|
|
|
|
|
(?: |
76
|
|
|
|
|
|
|
(?: |
77
|
|
|
|
|
|
|
1[28]| |
78
|
|
|
|
|
|
|
46 |
79
|
|
|
|
|
|
|
)\\d| |
80
|
|
|
|
|
|
|
2(?: |
81
|
|
|
|
|
|
|
[014-6]2| |
82
|
|
|
|
|
|
|
[23]3 |
83
|
|
|
|
|
|
|
) |
84
|
|
|
|
|
|
|
)\\d{6} |
85
|
|
|
|
|
|
|
', |
86
|
|
|
|
|
|
|
'geographic' => ' |
87
|
|
|
|
|
|
|
(?: |
88
|
|
|
|
|
|
|
2[12]428| |
89
|
|
|
|
|
|
|
3655[02] |
90
|
|
|
|
|
|
|
)\\d{4}| |
91
|
|
|
|
|
|
|
(?: |
92
|
|
|
|
|
|
|
2(?: |
93
|
|
|
|
|
|
|
22[0-79]| |
94
|
|
|
|
|
|
|
63[0-28] |
95
|
|
|
|
|
|
|
)| |
96
|
|
|
|
|
|
|
3654 |
97
|
|
|
|
|
|
|
)\\d{5}| |
98
|
|
|
|
|
|
|
(?: |
99
|
|
|
|
|
|
|
(?: |
100
|
|
|
|
|
|
|
1[28]| |
101
|
|
|
|
|
|
|
46 |
102
|
|
|
|
|
|
|
)\\d| |
103
|
|
|
|
|
|
|
2(?: |
104
|
|
|
|
|
|
|
[014-6]2| |
105
|
|
|
|
|
|
|
[23]3 |
106
|
|
|
|
|
|
|
) |
107
|
|
|
|
|
|
|
)\\d{6} |
108
|
|
|
|
|
|
|
', |
109
|
|
|
|
|
|
|
'mobile' => ' |
110
|
|
|
|
|
|
|
36554\\d{4}| |
111
|
|
|
|
|
|
|
(?: |
112
|
|
|
|
|
|
|
[16]0| |
113
|
|
|
|
|
|
|
4[04]| |
114
|
|
|
|
|
|
|
5[015]| |
115
|
|
|
|
|
|
|
7[07]| |
116
|
|
|
|
|
|
|
99 |
117
|
|
|
|
|
|
|
)\\d{7} |
118
|
|
|
|
|
|
|
', |
119
|
|
|
|
|
|
|
'pager' => '', |
120
|
|
|
|
|
|
|
'personal_number' => '', |
121
|
|
|
|
|
|
|
'specialrate' => '(900200\\d{3})', |
122
|
|
|
|
|
|
|
'toll_free' => '88\\d{7}', |
123
|
|
|
|
|
|
|
'voip' => '' |
124
|
|
|
|
|
|
|
}; |
125
|
|
|
|
|
|
|
my %areanames = (); |
126
|
|
|
|
|
|
|
$areanames{en} = {"9942422", "Zagatala", |
127
|
|
|
|
|
|
|
"9942621", "Lachin", |
128
|
|
|
|
|
|
|
"9942525", "Lankaran", |
129
|
|
|
|
|
|
|
"9942221", "Dashkasan", |
130
|
|
|
|
|
|
|
"9942121", "Shirvan", |
131
|
|
|
|
|
|
|
"9942524", "Jalilabad", |
132
|
|
|
|
|
|
|
"9942235", "Naftalan", |
133
|
|
|
|
|
|
|
"9942020", "Barda", |
134
|
|
|
|
|
|
|
"9942628", "Agdara", |
135
|
|
|
|
|
|
|
"9942027", "Goychay", |
136
|
|
|
|
|
|
|
"99436547", "Ordubad", |
137
|
|
|
|
|
|
|
"9942429", "Balakan", |
138
|
|
|
|
|
|
|
"9942128", "Saatli", |
139
|
|
|
|
|
|
|
"9942233", "Yevlakh", |
140
|
|
|
|
|
|
|
"99436541", "Babek", |
141
|
|
|
|
|
|
|
"9942330", "Siyazan", |
142
|
|
|
|
|
|
|
"9942623", "Qubadli", |
143
|
|
|
|
|
|
|
"99436550", "Nakhchivan\ city", |
144
|
|
|
|
|
|
|
"9942332", "Khachmaz", |
145
|
|
|
|
|
|
|
"9942638", "Jabrayil", |
146
|
|
|
|
|
|
|
"9942029", "Zardab", |
147
|
|
|
|
|
|
|
"99418", "Sumgayit", |
148
|
|
|
|
|
|
|
"9942427", "Mingachevir", |
149
|
|
|
|
|
|
|
"9942223", "Tartar", |
150
|
|
|
|
|
|
|
"994214", "Hajigabul", |
151
|
|
|
|
|
|
|
"9942123", "Sabirabad", |
152
|
|
|
|
|
|
|
"994224", "Agstafa\/Ganja\/Yevlakh", |
153
|
|
|
|
|
|
|
"9942631", "Fuzuli", |
154
|
|
|
|
|
|
|
"9942124", "Imishli", |
155
|
|
|
|
|
|
|
"9942521", "Masalli", |
156
|
|
|
|
|
|
|
"9942626", "Shusha", |
157
|
|
|
|
|
|
|
"9942022", "Agsu", |
158
|
|
|
|
|
|
|
"99436549", "Sadarak", |
159
|
|
|
|
|
|
|
"9942625", "Zangilan", |
160
|
|
|
|
|
|
|
"9942224", "Goranboy", |
161
|
|
|
|
|
|
|
"99436546", "Julfa", |
162
|
|
|
|
|
|
|
"99436544", "Nakhchivan\ city", |
163
|
|
|
|
|
|
|
"99436543", "Shahbuz", |
164
|
|
|
|
|
|
|
"9942231", "Tovuz", |
165
|
|
|
|
|
|
|
"9942125", "Salyan", |
166
|
|
|
|
|
|
|
"99436548", "Kangarli", |
167
|
|
|
|
|
|
|
"9942226", "Ganja", |
168
|
|
|
|
|
|
|
"9942225", "Ganja", |
169
|
|
|
|
|
|
|
"9942624", "Askaran", |
170
|
|
|
|
|
|
|
"9942420", "Gabala", |
171
|
|
|
|
|
|
|
"9942126", "Neftchala", |
172
|
|
|
|
|
|
|
"9942229", "Gazakh", |
173
|
|
|
|
|
|
|
"9942023", "Agdash", |
174
|
|
|
|
|
|
|
"9942335", "Shabran", |
175
|
|
|
|
|
|
|
"9942629", "Khojavand", |
176
|
|
|
|
|
|
|
"9942527", "Lerik", |
177
|
|
|
|
|
|
|
"9942222", "Agstafa", |
178
|
|
|
|
|
|
|
"9942024", "Gobustan", |
179
|
|
|
|
|
|
|
"9942122", "Beylagan", |
180
|
|
|
|
|
|
|
"9942630", "Hadrut", |
181
|
|
|
|
|
|
|
"9942520", "Yardimli", |
182
|
|
|
|
|
|
|
"9942333", "Guba", |
183
|
|
|
|
|
|
|
"9942026", "Shamakhi", |
184
|
|
|
|
|
|
|
"9942622", "Khankandi", |
185
|
|
|
|
|
|
|
"9942421", "Oguz", |
186
|
|
|
|
|
|
|
"9942025", "Kurdamir", |
187
|
|
|
|
|
|
|
"9942230", "Shamkir", |
188
|
|
|
|
|
|
|
"99436552", "Sharur", |
189
|
|
|
|
|
|
|
"9942232", "Gadabay", |
190
|
|
|
|
|
|
|
"9942620", "Khojali", |
191
|
|
|
|
|
|
|
"9942424", "Shaki", |
192
|
|
|
|
|
|
|
"99436542", "Sharur", |
193
|
|
|
|
|
|
|
"9942021", "Ujar", |
194
|
|
|
|
|
|
|
"9942522", "Astara", |
195
|
|
|
|
|
|
|
"9942120", "Hajigabul", |
196
|
|
|
|
|
|
|
"9942632", "Agdam", |
197
|
|
|
|
|
|
|
"9942338", "Gusar", |
198
|
|
|
|
|
|
|
"99412", "Baku", |
199
|
|
|
|
|
|
|
"9942425", "Gakh", |
200
|
|
|
|
|
|
|
"9942220", "Goygol", |
201
|
|
|
|
|
|
|
"9942127", "Agjabadi", |
202
|
|
|
|
|
|
|
"9942227", "Samukh", |
203
|
|
|
|
|
|
|
"9942331", "Khizi", |
204
|
|
|
|
|
|
|
"9942028", "Ismayilli", |
205
|
|
|
|
|
|
|
"9942627", "Kalbajar", |
206
|
|
|
|
|
|
|
"9942529", "Bilasuvar",}; |
207
|
|
|
|
|
|
|
|
208
|
|
|
|
|
|
|
sub new { |
209
|
13
|
|
|
13
|
1
|
58
|
my $class = shift; |
210
|
13
|
|
|
|
|
25
|
my $number = shift; |
211
|
13
|
|
|
|
|
80
|
$number =~ s/(^\+994|\D)//g; |
212
|
13
|
|
|
|
|
79
|
my $self = bless({ country_code => '994', number => $number, formatters => $formatters, validators => $validators, areanames => \%areanames}, $class); |
213
|
13
|
100
|
|
|
|
77
|
return $self if ($self->is_valid()); |
214
|
1
|
|
|
|
|
3
|
$number =~ s/^(?:0)//; |
215
|
1
|
|
|
|
|
15
|
$self = bless({ country_code => '994', number => $number, formatters => $formatters, validators => $validators, areanames => \%areanames}, $class); |
216
|
1
|
50
|
|
|
|
6
|
return $self->is_valid() ? $self : undef; |
217
|
|
|
|
|
|
|
} |
218
|
|
|
|
|
|
|
1; |