<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;"># automatically generated file, don't edit



# Copyright 2011 David Cantrell, derived from data from libphonenumber
# http://code.google.com/p/libphonenumber/
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
package Number::Phone::StubCountry::AZ;
use base qw(Number::Phone::StubCountry);

use strict;
use warnings;
use utf8;
our $VERSION = 1.20210309172128;

my $formatters = [
                {
                  'format' =&gt; '$1 $2 $3',
                  'intl_format' =&gt; 'NA',
                  'leading_digits' =&gt; '[1-9]',
                  'pattern' =&gt; '(\\d{3})(\\d{2})(\\d{2})'
                },
                {
                  'format' =&gt; '$1 $2 $3 $4',
                  'leading_digits' =&gt; '90',
                  'national_rule' =&gt; '0$1',
                  'pattern' =&gt; '(\\d{3})(\\d{2})(\\d{2})(\\d{2})'
                },
                {
                  'format' =&gt; '$1 $2 $3 $4',
                  'leading_digits' =&gt; '
            1[28]|
            2|
            365(?:
              [0-46-9]|
              5[0-35-9]
            )|
            46
          ',
                  'national_rule' =&gt; '(0$1)',
                  'pattern' =&gt; '(\\d{2})(\\d{3})(\\d{2})(\\d{2})'
                },
                {
                  'format' =&gt; '$1 $2 $3 $4',
                  'leading_digits' =&gt; '[13-9]',
                  'national_rule' =&gt; '0$1',
                  'pattern' =&gt; '(\\d{2})(\\d{3})(\\d{2})(\\d{2})'
                }
              ];

my $validators = {
                'fixed_line' =&gt; '
          (?:
            222[0-79]\\d|
            365(?:
              [0-46-9]\\d|
              5[0-35-9]
            )
          )\\d{4}|
          (?:
            (?:
              1[28]|
              46
            )\\d|
            2(?:
              [045]2|
              1[24]|
              2[34]|
              33|
              6[23]
            )
          )\\d{6}
        ',
                'geographic' =&gt; '
          (?:
            222[0-79]\\d|
            365(?:
              [0-46-9]\\d|
              5[0-35-9]
            )
          )\\d{4}|
          (?:
            (?:
              1[28]|
              46
            )\\d|
            2(?:
              [045]2|
              1[24]|
              2[34]|
              33|
              6[23]
            )
          )\\d{6}
        ',
                'mobile' =&gt; '
          (?:
            36554|
            99[2-9]\\d\\d
          )\\d{4}|
          (?:
            [16]0|
            4[04]|
            5[015]|
            7[07]
          )\\d{7}
        ',
                'pager' =&gt; '',
                'personal_number' =&gt; '',
                'specialrate' =&gt; '(900200\\d{3})',
                'toll_free' =&gt; '88\\d{7}',
                'voip' =&gt; ''
              };
my %areanames = ();
$areanames{en} = {"99436552", "Sharur",
"9942229", "Gazakh",
"9942332", "Khachmaz",
"9942024", "Gobustan",
"9942125", "Salyan",
"99436544", "Nakhchivan\ city",
"9942020", "Barda",
"9942231", "Tovuz",
"9942525", "Lankaran",
"9942625", "Zangilan",
"9942338", "Gusar",
"9942222", "Agstafa",
"99436549", "Sadarak",
"9942027", "Goychay",
"9942021", "Ujar",
"9942230", "Shamkir",
"9942227", "Samukh",
"9942022", "Agsu",
"9942221", "Dashkasan",
"99436547", "Ordubad",
"9942123", "Sabirabad",
"9942425", "Gakh",
"9942232", "Gadabay",
"9942220", "Goygol",
"9942126", "Neftchala",
"9942224", "Goranboy",
"99436548", "Kangarli",
"9942331", "Khizi",
"9942029", "Zardab",
"99422428", "Agstafa\/Ganja\/Yevlakh",
"9942028", "Ismayilli",
"9942626", "Shusha",
"9942623", "Qubadli",
"9942330", "Siyazan",
"9942127", "Agjabadi",
"9942121", "Shirvan",
"99412", "Baku",
"9942524", "Jalilabad",
"9942624", "Askaran",
"9942120", "Hajigabul",
"9942223", "Tartar",
"9942638", "Jabrayil",
"9942429", "Balakan",
"9942226", "Ganja",
"9942025", "Kurdamir",
"9942124", "Imishli",
"99418", "Sumgayit",
"9942627", "Kalbajar",
"99421428", "Hajigabul",
"9942621", "Lachin",
"9942527", "Lerik",
"9942521", "Masalli",
"9942422", "Zagatala",
"9942235", "Naftalan",
"99436541", "Babek",
"99436546", "Julfa",
"9942620", "Khojali",
"9942333", "Guba",
"99436542", "Sharur",
"9942632", "Agdam",
"9942520", "Yardimli",
"9942631", "Fuzuli",
"9942427", "Mingachevir",
"9942421", "Oguz",
"9942522", "Astara",
"9942630", "Hadrut",
"9942128", "Saatli",
"9942622", "Khankandi",
"9942225", "Ganja",
"99436550", "Nakhchivan\ city",
"9942420", "Gabala",
"9942026", "Shamakhi",
"99436543", "Shahbuz",
"9942424", "Shaki",
"9942023", "Agdash",
"9942335", "Shabran",
"9942529", "Bilasuvar",
"9942629", "Khojavand",
"9942122", "Beylagan",
"9942628", "Agdara",
"9942233", "Yevlakh",};

    sub new {
      my $class = shift;
      my $number = shift;
      $number =~ s/(^\+994|\D)//g;
      my $self = bless({ number =&gt; $number, formatters =&gt; $formatters, validators =&gt; $validators, areanames =&gt; \%areanames}, $class);
      return $self if ($self-&gt;is_valid());
      $number =~ s/^(?:0)//;
      $self = bless({ number =&gt; $number, formatters =&gt; $formatters, validators =&gt; $validators, areanames =&gt; \%areanames}, $class);
      return $self-&gt;is_valid() ? $self : undef;
    }
1;</pre></body></html>