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
|
|
1353
|
use base qw(Number::Phone::StubCountry); |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
259
|
|
21
|
|
|
|
|
|
|
|
22
|
2
|
|
|
2
|
|
16
|
use strict; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
48
|
|
23
|
2
|
|
|
2
|
|
14
|
use warnings; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
57
|
|
24
|
2
|
|
|
2
|
|
11
|
use utf8; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
12
|
|
25
|
|
|
|
|
|
|
our $VERSION = 1.20230307181417; |
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} = {"9942420", "Gabala", |
127
|
|
|
|
|
|
|
"99436548", "Kangarli", |
128
|
|
|
|
|
|
|
"9942027", "Goychay", |
129
|
|
|
|
|
|
|
"9942235", "Naftalan", |
130
|
|
|
|
|
|
|
"9942525", "Lankaran", |
131
|
|
|
|
|
|
|
"9942125", "Salyan", |
132
|
|
|
|
|
|
|
"9942424", "Shaki", |
133
|
|
|
|
|
|
|
"9942025", "Kurdamir", |
134
|
|
|
|
|
|
|
"994214", "Hajigabul", |
135
|
|
|
|
|
|
|
"9942626", "Shusha", |
136
|
|
|
|
|
|
|
"9942229", "Gazakh", |
137
|
|
|
|
|
|
|
"9942222", "Agstafa", |
138
|
|
|
|
|
|
|
"9942330", "Siyazan", |
139
|
|
|
|
|
|
|
"9942127", "Agjabadi", |
140
|
|
|
|
|
|
|
"9942620", "Khojali", |
141
|
|
|
|
|
|
|
"9942527", "Lerik", |
142
|
|
|
|
|
|
|
"9942624", "Askaran", |
143
|
|
|
|
|
|
|
"9942221", "Dashkasan", |
144
|
|
|
|
|
|
|
"9942638", "Jabrayil", |
145
|
|
|
|
|
|
|
"9942233", "Yevlakh", |
146
|
|
|
|
|
|
|
"9942220", "Goygol", |
147
|
|
|
|
|
|
|
"9942332", "Khachmaz", |
148
|
|
|
|
|
|
|
"99418", "Sumgayit", |
149
|
|
|
|
|
|
|
"9942622", "Khankandi", |
150
|
|
|
|
|
|
|
"99436549", "Sadarak", |
151
|
|
|
|
|
|
|
"9942629", "Khojavand", |
152
|
|
|
|
|
|
|
"9942123", "Sabirabad", |
153
|
|
|
|
|
|
|
"9942226", "Ganja", |
154
|
|
|
|
|
|
|
"9942331", "Khizi", |
155
|
|
|
|
|
|
|
"9942621", "Lachin", |
156
|
|
|
|
|
|
|
"9942128", "Saatli", |
157
|
|
|
|
|
|
|
"9942224", "Goranboy", |
158
|
|
|
|
|
|
|
"9942429", "Balakan", |
159
|
|
|
|
|
|
|
"99436542", "Sharur", |
160
|
|
|
|
|
|
|
"9942028", "Ismayilli", |
161
|
|
|
|
|
|
|
"9942422", "Zagatala", |
162
|
|
|
|
|
|
|
"99436543", "Shahbuz", |
163
|
|
|
|
|
|
|
"9942023", "Agdash", |
164
|
|
|
|
|
|
|
"9942421", "Oguz", |
165
|
|
|
|
|
|
|
"99436541", "Babek", |
166
|
|
|
|
|
|
|
"9942021", "Ujar", |
167
|
|
|
|
|
|
|
"9942022", "Agsu", |
168
|
|
|
|
|
|
|
"99436544", "Nakhchivan\ city", |
169
|
|
|
|
|
|
|
"9942029", "Zardab", |
170
|
|
|
|
|
|
|
"9942225", "Ganja", |
171
|
|
|
|
|
|
|
"9942232", "Gadabay", |
172
|
|
|
|
|
|
|
"9942333", "Guba", |
173
|
|
|
|
|
|
|
"994224", "Agstafa\/Ganja\/Yevlakh", |
174
|
|
|
|
|
|
|
"99436552", "Sharur", |
175
|
|
|
|
|
|
|
"9942529", "Bilasuvar", |
176
|
|
|
|
|
|
|
"9942630", "Hadrut", |
177
|
|
|
|
|
|
|
"9942623", "Qubadli", |
178
|
|
|
|
|
|
|
"9942227", "Samukh", |
179
|
|
|
|
|
|
|
"9942122", "Beylagan", |
180
|
|
|
|
|
|
|
"9942522", "Astara", |
181
|
|
|
|
|
|
|
"99436547", "Ordubad", |
182
|
|
|
|
|
|
|
"99436550", "Nakhchivan\ city", |
183
|
|
|
|
|
|
|
"9942338", "Gusar", |
184
|
|
|
|
|
|
|
"9942231", "Tovuz", |
185
|
|
|
|
|
|
|
"9942628", "Agdara", |
186
|
|
|
|
|
|
|
"9942121", "Shirvan", |
187
|
|
|
|
|
|
|
"9942521", "Masalli", |
188
|
|
|
|
|
|
|
"9942120", "Hajigabul", |
189
|
|
|
|
|
|
|
"99436546", "Julfa", |
190
|
|
|
|
|
|
|
"9942520", "Yardimli", |
191
|
|
|
|
|
|
|
"9942627", "Kalbajar", |
192
|
|
|
|
|
|
|
"9942230", "Shamkir", |
193
|
|
|
|
|
|
|
"9942223", "Tartar", |
194
|
|
|
|
|
|
|
"9942126", "Neftchala", |
195
|
|
|
|
|
|
|
"9942632", "Agdam", |
196
|
|
|
|
|
|
|
"99412", "Baku", |
197
|
|
|
|
|
|
|
"9942124", "Imishli", |
198
|
|
|
|
|
|
|
"9942425", "Gakh", |
199
|
|
|
|
|
|
|
"9942631", "Fuzuli", |
200
|
|
|
|
|
|
|
"9942524", "Jalilabad", |
201
|
|
|
|
|
|
|
"9942024", "Gobustan", |
202
|
|
|
|
|
|
|
"9942427", "Mingachevir", |
203
|
|
|
|
|
|
|
"9942026", "Shamakhi", |
204
|
|
|
|
|
|
|
"9942625", "Zangilan", |
205
|
|
|
|
|
|
|
"9942335", "Shabran", |
206
|
|
|
|
|
|
|
"9942020", "Barda",}; |
207
|
|
|
|
|
|
|
|
208
|
|
|
|
|
|
|
sub new { |
209
|
13
|
|
|
13
|
1
|
54
|
my $class = shift; |
210
|
13
|
|
|
|
|
24
|
my $number = shift; |
211
|
13
|
|
|
|
|
77
|
$number =~ s/(^\+994|\D)//g; |
212
|
13
|
|
|
|
|
73
|
my $self = bless({ country_code => '994', number => $number, formatters => $formatters, validators => $validators, areanames => \%areanames}, $class); |
213
|
13
|
100
|
|
|
|
58
|
return $self if ($self->is_valid()); |
214
|
1
|
|
|
|
|
2
|
$number =~ s/^(?:0)//; |
215
|
1
|
|
|
|
|
11
|
$self = bless({ country_code => '994', number => $number, formatters => $formatters, validators => $validators, areanames => \%areanames}, $class); |
216
|
1
|
50
|
|
|
|
7
|
return $self->is_valid() ? $self : undef; |
217
|
|
|
|
|
|
|
} |
218
|
|
|
|
|
|
|
1; |