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