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