# 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::AL;
use base qw(Number::Phone::StubCountry);

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

my $formatters = [{'pattern' => '(4)(\\d{3})(\\d{4})','leading_digits' => '4[0-6]'},{'leading_digits' => '6','pattern' => '(6[6-9])(\\d{3})(\\d{4})'},{'pattern' => '(\\d{2})(\\d{3})(\\d{3})','leading_digits' => '[2358][2-5]|4[7-9]'},{'leading_digits' => '[235][16-9]|8[016-9]|[79]','pattern' => '(\\d{3})(\\d{3,5})'}];
my $validators = {'mobile' => '6[6-9]\\d{7}','fixed_line' => '(?:2(?:[168][1-9]|[247]\\d|9[1-7])|3(?:1[1-3]|[2-6]\\d|[79][1-8]|8[1-9])|4\\d{2}|5(?:1[1-4]|[2-578]\\d|6[1-5]|9[1-7])|8(?:[19][1-5]|[2-6]\\d|[78][1-7]))\\d{5}','pager' => '','geographic' => '(?:2(?:[168][1-9]|[247]\\d|9[1-7])|3(?:1[1-3]|[2-6]\\d|[79][1-8]|8[1-9])|4\\d{2}|5(?:1[1-4]|[2-578]\\d|6[1-5]|9[1-7])|8(?:[19][1-5]|[2-6]\\d|[78][1-7]))\\d{5}','special_rate' => '(808\\d{3})|(900\\d{3})','toll_free' => '800\\d{4}','voip' => '','personal_number' => '700\\d{5}'};sub areaname { my $self = shift; my $number = $self->{number}; my %map = (355211 => "Koplik",355212 => "Pukë",355213 => "Bajram\ Curri",355214 => "Krumë",355215 => "Lezhë",355216 => "Rrëshen",355217 => "Burrel",355218 => "Peshkopi",355219 => "Bulqizë",35522 => "Shkodër",35524 => "Kukës",355261 => "Vau\-Dejës",355262 => "Rrethinat\/Ana\-Malit\,\ Shkodër",355263 => "Pult\/Shalë\/Shosh\/Temal\/Shllak\,\ Shkodër",355264 => "Postribë\/Gur\ i\ Zi",355265 => "Vig\-Mnelë\/Hajmel\,\ Shkodër",355266 => "Bushat\/Bërdicë\,\ Shkodër",355267 => "Dajç\/Velipojë\,\ Shkodër",355268 => "Qendër\/Gruemirë\,\ Malësi\ e\ Madhe",355269 => "Kastrat\/Shkrel\/Kelmend\,\ Malësi\ e\ Madhe",355270 => "Kolsh\/Surroj\/Arren\/Malzi\,\ Kukës",355271 => "Fushë\-Arrëz\/Rrapë\,\ Pukë",355272 => "Qerret\/Qelëz\/Gjegjan\,\ Pukë",355273 => "Iballë\/Fierzë\/Blerim\/Qafë\-Mali\,\ Pukë",355274 => "Tropojë\/Llugaj\/Margegaj\,\ Tropojë",355275 => "Bujan\/Fierzë\/Bytyc\/Lekbiba\,\ Tropojë",355276 => "Fajza\/Golaj\/Gjinaj\,\ Has",355277 => "Shtiqen\/Tërthore\/Zapod\,\ Kukës",355278 => "Bicaj\/Topojan\/Shishtavec\,\ Kukës",355279 => "Gryk\-Çajë\/Ujmisht\/Bushtrice\/Kalis\,\ Kukës",355281 => "Shëngjin\/Balldre\,\ Lezhë",355282 => "Kallmet\/Blinisht\/Dajç\/Ungrej\,\ Lezhë",355283 => "Kolsh\/Zejmen\/Shënkoll\,\ Lezhë",355284 => "Rubik\,\ Mirditë",355285 => "Kthjellë\/Selitë\,\ Mirditë",355286 => "Kaçinar\/Orosh\/Fan\,\ Mirditë",355287 => "Klos\/Suç\/Lis\,\ Mat",355288 => "Baz\/Komsi\/Gurrë\/Xibër\,\ Mat",355289 => "Ulëz\/Rukaj\/Derjan\/Macukull\,\ Mat",355291 => "Tomin\/Luzni\,\ Dibër",355292 => "Maqellarë\/Melan\,\ Dibër",355293 => "Kastriot\/Muhur\/Selishtë\,\ Dibër",355294 => "Arras\/Fushë\-Çidhën\/Lurë\,\ Dibër",355295 => "Sllovë\/Zall\-Dardhë\/Zall\-Reç\/Kala\ e\ Dodes\,\ Dibër",355296 => "Fushë\-Bulqizë\/Shupenzë\/Zerqan\,\ Bulqizë",355297 => "Gjorice\/Ostren\/Trebisht\/Martanesh\,\ Bulqizë",355311 => "Kuçovë",355312 => "Çorovodë\,\ Skrapar",355313 => "Ballsh\,\ Mallakastër",35532 => "Berat",35533 => "Vlorë",35534 => "Fier",35535 => "Lushnje",355360 => "Leshnje\/Potom\/Çepan\/Gjerbës\/Zhepë\,\ Skrapar",355361 => "Ura\ Vajgurore\,\ Berat",355362 => "Velabisht\/Roshnik\,\ Berat",355363 => "Otllak\/Lumas\,\ Berat",355364 => "Vërtop\/Terpan\,\ Berat",355365 => "Sinjë\/Cukalat\,\ Berat",355366 => "Poshnjë\/Kutalli\,\ Berat",355367 => "Perondi\/Kozarë\,\ Kuçovë",355368 => "Poliçan\/Bogovë\,\ Skrapar",355369 => "Qendër\/Vendreshë\,\ Skrapar",355371 => "Divjakë\,\ Lushnjë",355372 => "Karbunarë\/Fier\-Shegan\/Hysgjokaj\/Ballagat\,\ Lushnjë",355373 => "Krutje\/Bubullimë\/Allkaj\,\ Lushnjë",355374 => "Gradishtë\/Kolonjë\,\ Lushnjë",355375 => "Golem\/Grabian\/Remas\,\ Lushnjë",355376 => "Dushk\/Tërbuf\,\ Lushnjë",355377 => "Qendër\/Greshicë\/Hekal\,\ Mallakastër",355378 => "Aranitas\/Ngracan\/Selitë\/Fratar\/Kutë\,\ Mallakastër",355381 => "Patos\,\ Fier",355382 => "Roskovec\,\ Fier",355383 => "Qendër\,\ Fier",355384 => "Mbrostar\ Ura\/LIibofshë\,\ Fier",355385 => "Portëz\/Zharëz\,\ Fier",355386 => "Kuman\/Kurjan\/Strum\/Ruzhdie\,\ Fier",355387 => "Cakran\/Frakull\,\ Fier",355388 => "Levan\,\ Fier",355389 => "Dermenas\/Topojë\,\ Fier",355391 => "Orikum\,\ Vlorë",355392 => "Selenicë\,\ Vlorë",355393 => "Himarë\,\ Vlorë",355394 => "Qendër\,\ Vlorë",355395 => "Novoselë\,\ Vlorë",355396 => "Shushicë\/Armen\,\ Vlorë",355397 => "Vllahinë\/Kote\,\ Vlorë",355398 => "Sevaster\/Brataj\/Hore\-Vranisht\,\ Vlorë",3554 => "Tirana",35547 => "Kamëz\/Vorë\/Paskuqan\/Zall\-Herr\/Burxullë\/Prezë\,\ Tiranë",35548 => "Kashar\/Vaqar\/Ndroq\/Pezë\/Farkë\/Dajt\,\ Tiranë",35549 => "Petrelë\/Baldushk\/Bërzhitë\/Krrabë\/Shengjergj\/Zall\-Bastar\,\ Tiranë",355511 => "Kruje",355512 => "Peqin",355513 => "Gramsh",355514 => "Librazhd",35552 => "Durrës",35553 => "Laç\,\ Kurbin",35554 => "Elbasan",35555 => "Kavajë",355561 => "Mamurras\,\ Kurbin",355562 => "Milot\/Fushe\-Kuqe\,\ Kurbin",355563 => "Fushë\-Krujë",355564 => "Nikël\/Bubq\,\ Kruje",355565 => "Koder\-Thumane\/Cudhi\,\ Kruje",355570 => "Gosë\/Lekaj\/Sinaballaj\,\ Kavajë",355571 => "Shijak\,\ Durrës",355572 => "Manëz\,\ Durrës",355573 => "Sukth\,\ Durrës",355574 => "Rashbull\/Gjepalaj\,\ Durrës",355575 => "Xhafzotaj\/Maminas\,\ Durrës",355576 => "Katund\ i\ Ri\/Ishem\,\ Durrës",355577 => "Rrogozhinë\,\ Kavajë",355578 => "Synej\/Golem\,\ Kavajë",355579 => "Luz\ i\ Vogël\/Kryevidh\/Helmës\,\ Kavajë",355580 => "Përparim\/Pajovë\,\ Peqin",355581 => "Cërrik\,\ Elbasan",355582 => "Belsh\,\ Elbasan",355583 => "Bradashesh\/Shirgjan\,\ Elbasan",355584 => "Labinot\-Fushë\/Labinot\-Mal\/Funarë\/Gracen\,\ Elbasan",355585 => "Shushicë\/Tregan\/Gjinar\/Zavalinë\,\ Elbasan",355586 => "Gjergjan\/Papër\/Shalës\,\ Elbasan",355587 => "Gostime\/Klos\/Mollas\,\ Elbasan",355588 => "Rrasë\/Fierzë\/Kajan\/Grekan\,\ Elbasan",355589 => "Karinë\/Gjocaj\/Shezë\,\ Peqin",355591 => "Përrenjas\,\ Librazhd",355592 => "Qendër\,\ Librazhd",355593 => "Lunik\/Orenjë\/Stebleve\,\ Librazhd",355594 => "Hotolisht\/Polis\/Stravaj\,\ Librazhd",355595 => "Qukës\/Rajcë\,\ Librazhd",355596 => "Pishaj\/Sult\/Tunjë\/Kushovë\/Skënderbegas\,\ Gramsh",355597 => "Kodovjat\/Poroçan\/Kukur\/Lenie\,\ Gramsh",355811 => "Bilisht\,\ Devoll",355812 => "Ersekë\,\ Kolonjë",355813 => "Përmet",355814 => "Tepelenë",355815 => "Delvinë",35582 => "Korçë",35583 => "Pogradec",35584 => "Gjirokastër",35585 => "Sarandë",355860 => "Trebinjë\/Proptisht\/Velçan\,\ Pogradec",355861 => "Maliq\,\ Korçë",355862 => "Qendër\,\ Korçë",355863 => "Drenovë\/Mollaj\,\ Korçë",355864 => "Voskop\/Voskopojë\/Vithkuq\/Lekas\,\ Korçë",355865 => "Gorë\/Pirg\/Moglicë\,\ Korçë",355866 => "Libonik\/Vreshtaz\,\ Korçë",355867 => "Pojan\/Liqenas\,\ Korçë",355868 => "Buçimas\/Udenisht\,\ Pogradec",355869 => "Çëravë\/Dardhas\,\ Pogradec",355871 => "Leskovik\/Barmash\/Novoselë\,\ Kolonjë",355872 => "Qendër\ Ersekë\/Mollas\/Çlirim\,\ Kolonjë",355873 => "Qendër\ Bilisht\/Progër\,\ Devoll",355874 => "Hoçisht\/Miras\,\ Devoll",355875 => "Këlcyrë\,\ Përmet",355876 => "Qendër\/Frashër\/Petran\/Çarshovë\,\ Përmet",355877 => "Dishnicë\/Sukë\/Ballaban\,\ Përmet",355881 => "Libohovë\/Qendër\,\ Gjirokastër",355882 => "Cepo\/Picar\/Lazarat\/Atigon\,\ Gjirokastër",355883 => "Lunxheri\/Odrie\/Zagorie\/Pogon\,\ Gjirokastër",355884 => "Dropull\ i\ Poshtëm\/Dropull\ i\ Sipërm\,\ Gjirokastër",355885 => "Memaliaj\,\ Tepelenë",355886 => "Qendër\/Kurvelesh\/Lopëz\,\ Tepelenë",355887 => "Qesarat\/Krahës\/Luftinje\/Buz\,\ Tepelenë",355891 => "Konispol\/Xare\/Markat\,\ Sarandë",355892 => "Aliko\/Lukovë\,\ Sarandë",355893 => "Ksamil\,\ Sarandë",355894 => "Livadhja\/Dhivër\,\ Sarandë",355895 => "Finiq\/Mesopotam\/Vergo\,\ Delvinë",);
      foreach my $prefix (map { substr($number, 0, $_) } reverse(1..length($number))) {
        return $map{"355$prefix"} if exists($map{"355$prefix"});
      }
      return undef;
    }
sub new {
  my $class = shift;
  my $number = shift;
  $number =~ s/(^\+355|\D)//g;
  my $self = bless({ number => $number, formatters => $formatters, validators => $validators }, $class);
  return $self if ($self->is_valid());
  $number =~ s/(^0)//g;
  $self = bless({ number => $number, formatters => $formatters, validators => $validators }, $class);
  return $self->is_valid() ? $self : undef;
}

1;
