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

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

my $formatters = [{'leading_digits' => '[2-5]|7[1-9]|[89](?:[1-9]|0[2-9])','pattern' => '(\\d{2})(\\d{3})'},{'pattern' => '(\\d{2})(\\d{2})(\\d{2})','leading_digits' => '[2-5]|7[1-9]|[89](?:[1-9]|0[2-9])'},{'leading_digits' => '20','pattern' => '(\\d{2})(\\d{2})(\\d{3})'},{'leading_digits' => '2(?:[0367]|4[3-8])','pattern' => '(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})'},{'leading_digits' => '20','pattern' => '(\\d{2})(\\d{2})(\\d{2})(\\d{3})'},{'pattern' => '(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})','leading_digits' => '2(?:[0367]|4[3-8])'},{'leading_digits' => '2(?:[12589]|4[12])|[3-5]|7[1-9]|8(?:[1-9]|0[2-9])|9(?:[1-9]|0[2-46-9])','pattern' => '(\\d{2})(\\d{2})(\\d{2})(\\d{1,4})'},{'pattern' => '(\\d{3})(\\d{2})(\\d{3})','leading_digits' => '70|80[01]|90[015]'},{'leading_digits' => '6','pattern' => '(\\d{3})(\\d{3})(\\d{3})'}];
my $validators = {'toll_free' => '800\\d{5}','voip' => '20(?:1\\d{5}|[2-689]\\d{1,7})','personal_number' => '70\\d{6}','geographic' => '(?:2[2-9]\\d{2,9}|(?:[3457]\\d{2}|8(?:0[2-9]|[13-9]\\d)|9(?:0[89]|[2-579]\\d))\\d{1,8})','pager' => '','special_rate' => '(801\\d{5})|(90[015]\\d{5})','fixed_line' => '(?:2[2-9]\\d{2,9}|(?:[3457]\\d{2}|8(?:0[2-9]|[13-9]\\d)|9(?:0[89]|[2-579]\\d))\\d{1,8})','mobile' => '6[2679][18]\\d{6}'};sub areaname { my $self = shift; my $number = $self->{number}; my %map = (35221 => "Weicherdange",35222 => "Luxembourg\ City",35223 => "Mondorf\-les\-Bains\/Bascharage\/Noerdange\/Remich",35224 => "Luxembourg",3522421 => "Weicherdange",3522422 => "Luxembourg\ City",3522423 => "Mondorf\-les\-Bains\/Bascharage\/Noerdange\/Remich",3522425 => "Luxembourg",3522427 => "Belair\,\ Luxembourg",3522428 => "Luxembourg\ City",3522429 => "Luxembourg\/Kockelscheuer",3522430 => "Capellen\/Kehlen",3522431 => "Bertrange\/Mamer\/Munsbach\/Strassen",3522432 => "Lintgen\/Mersch\/Steinfort",3522433 => "Walferdange",3522434 => "Rameldange\/Senningerberg",3522435 => "Sandweiler\/Moutfort\/Roodt\-sur\-Syre",3522436 => "Hesperange\/Kockelscheuer\/Roeser",3522437 => "Leudelange\/Ehlange\/Mondercange",3522439 => "Windhof\/Steinfort",3522440 => "Howald",3522442 => "Plateau\ de\ Kirchberg",3522443 => "Findel\/Kirchberg",3522445 => "Diedrich",3522447 => "Lintgen",3522448 => "Contern\/Foetz",3522449 => "Howald",3522450 => "Bascharage\/Petange\/Rodange",3522451 => "Dudelange\/Bettembourg\/Livange",3522452 => "Dudelange",3522453 => "Esch\-sur\-Alzette",3522454 => "Esch\-sur\-Alzette",3522455 => "Esch\-sur\-Alzette\/Mondercange",3522456 => "Rumelange",3522457 => "Esch\-sur\-Alzette\/Schifflange",3522458 => "Soleuvre\/Differdange",3522459 => "Soleuvre",3522467 => "Dudelange",3522471 => "Betzdorf",3522472 => "Echternach",3522473 => "Rosport",3522474 => "Wasserbillig",3522475 => "Grevenmacher\-sur\-Moselle",3522476 => "Wormeldange",3522478 => "Junglinster",3522479 => "Berdorf\/Consdorf",3522480 => "Diekirch",3522481 => "Ettelbruck\/Reckange\-sur\-Mess",3522483 => "Vianden",3522484 => "Han\/Lesse",3522485 => "Bissen\/Roost",3522487 => "Larochette",3522488 => "Mertzig\/Wahl",3522492 => "Clervaux\/Fischbach\/Hosingen",3522495 => "Wiltz",3522497 => "Huldange",3522499 => "Troisvierges",35225 => "Luxembourg",3522621 => "Weicherdange",3522622 => "Luxembourg\ City",3522623 => "Mondorf\-les\-Bains\/Bascharage\/Noerdange\/Remich",3522625 => "Luxembourg",3522627 => "Belair\,\ Luxembourg",3522628 => "Luxembourg\ City",3522629 => "Luxembourg\/Kockelscheuer",3522630 => "Capellen\/Kehlen",3522631 => "Bertrange\/Mamer\/Munsbach\/Strassen",3522632 => "Lintgen\/Mersch\/Steinfort",3522633 => "Walferdange",3522634 => "Rameldange\/Senningerberg",3522635 => "Sandweiler\/Moutfort\/Roodt\-sur\-Syre",3522636 => "Hesperange\/Kockelscheuer\/Roeser",3522637 => "Leudelange\/Ehlange\/Mondercange",3522639 => "Windhof\/Steinfort",3522640 => "Howald",3522642 => "Plateau\ de\ Kirchberg",3522643 => "Findel\/Kirchberg",3522645 => "Diedrich",3522647 => "Lintgen",3522648 => "Contern\/Foetz",3522649 => "Howald",3522650 => "Bascharage\/Petange\/Rodange",3522651 => "Dudelange\/Bettembourg\/Livange",3522652 => "Dudelange",3522653 => "Esch\-sur\-Alzette",3522654 => "Esch\-sur\-Alzette",3522655 => "Esch\-sur\-Alzette\/Mondercange",3522656 => "Rumelange",3522657 => "Esch\-sur\-Alzette\/Schifflange",3522658 => "Soleuvre\/Differdange",3522659 => "Soleuvre",3522667 => "Dudelange",3522671 => "Betzdorf",3522672 => "Echternach",3522673 => "Rosport",3522674 => "Wasserbillig",3522675 => "Grevenmacher\-sur\-Moselle",3522676 => "Wormeldange",3522678 => "Junglinster",3522679 => "Berdorf\/Consdorf",3522680 => "Diekirch",3522681 => "Ettelbruck\/Reckange\-sur\-Mess",3522683 => "Vianden",3522684 => "Han\/Lesse",3522685 => "Bissen\/Roost",3522687 => "Larochette",3522688 => "Mertzig\/Wahl",3522692 => "Clervaux\/Fischbach\/Hosingen",3522695 => "Wiltz",3522697 => "Huldange",3522699 => "Troisvierges",3522721 => "Weicherdange",3522722 => "Luxembourg\ City",3522723 => "Mondorf\-les\-Bains\/Bascharage\/Noerdange\/Remich",3522725 => "Luxembourg",3522727 => "Belair\,\ Luxembourg",3522728 => "Luxembourg\ City",3522729 => "Luxembourg\/Kockelscheuer",3522730 => "Capellen\/Kehlen",3522731 => "Bertrange\/Mamer\/Munsbach\/Strassen",3522732 => "Lintgen\/Mersch\/Steinfort",3522733 => "Walferdange",3522734 => "Rameldange\/Senningerberg",3522735 => "Sandweiler\/Moutfort\/Roodt\-sur\-Syre",3522736 => "Hesperange\/Kockelscheuer\/Roeser",3522737 => "Leudelange\/Ehlange\/Mondercange",3522739 => "Windhof\/Steinfort",3522740 => "Howald",3522742 => "Plateau\ de\ Kirchberg",3522743 => "Findel\/Kirchberg",3522745 => "Diedrich",3522747 => "Lintgen",3522748 => "Contern\/Foetz",3522749 => "Howald",3522750 => "Bascharage\/Petange\/Rodange",3522751 => "Dudelange\/Bettembourg\/Livange",3522752 => "Dudelange",3522753 => "Esch\-sur\-Alzette",3522754 => "Esch\-sur\-Alzette",3522755 => "Esch\-sur\-Alzette\/Mondercange",3522756 => "Rumelange",3522757 => "Esch\-sur\-Alzette\/Schifflange",3522758 => "Soleuvre\/Differdange",3522759 => "Soleuvre",3522767 => "Dudelange",3522771 => "Betzdorf",3522772 => "Echternach",3522773 => "Rosport",3522774 => "Wasserbillig",3522775 => "Grevenmacher\-sur\-Moselle",3522776 => "Wormeldange",3522778 => "Junglinster",3522779 => "Berdorf\/Consdorf",3522780 => "Diekirch",3522781 => "Ettelbruck\/Reckange\-sur\-Mess",3522783 => "Vianden",3522784 => "Han\/Lesse",3522785 => "Bissen\/Roost",3522787 => "Larochette",3522788 => "Mertzig\/Wahl",3522792 => "Clervaux\/Fischbach\/Hosingen",3522795 => "Wiltz",3522797 => "Huldange",3522799 => "Troisvierges",35228 => "Luxembourg\ City",35229 => "Luxembourg\/Kockelscheuer",35230 => "Capellen\/Kehlen",35231 => "Bertrange\/Mamer\/Munsbach\/Strassen",35232 => "Mersch",35233 => "Walferdange",35234 => "Rameldange\/Senningerberg",35235 => "Sandweiler\/Moutfort\/Roodt\-sur\-Syre",35236 => "Hesperange\/Kockelscheuer\/Roeser",35237 => "Leudelange\/Ehlange\/Mondercange",35239 => "Windhof\/Steinfort",3524 => "Luxembourg\ City",35240 => "Howald",35242 => "Plateau\ de\ Kirchberg",35243 => "Findel\/Kirchberg",35245 => "Diedrich",35247 => "Lintgen",35248 => "Contern\/Foetz",35249 => "Howald",35250 => "Bascharage\/Petange\/Rodange",35251 => "Dudelange\/Bettembourg\/Livange",35252 => "Dudelange",35253 => "Esch\-sur\-Alzette",35254 => "Esch\-sur\-Alzette",35255 => "Esch\-sur\-Alzette\/Mondercange",35256 => "Rumelange",35257 => "Esch\-sur\-Alzette\/Schifflange",35258 => "Differdange",35259 => "Soleuvre",35267 => "Dudelange",35271 => "Betzdorf",35272 => "Echternach",35273 => "Rosport",35274 => "Wasserbillig",35275 => "Grevenmacher",35276 => "Wormeldange",35278 => "Junglinster",35279 => "Berdorf\/Consdorf",35280 => "Diekirch",35281 => "Ettelbruck",35283 => "Vianden",35284 => "Han\/Lesse",35285 => "Bissen\/Roost",35287 => "Larochette",35288 => "Mertzig\/Wahl",35292 => "Clervaux\/Fischbach\/Hosingen",35295 => "Wiltz",35297 => "Huldange",35299 => "Troisvierges",);
      foreach my $prefix (map { substr($number, 0, $_) } reverse(1..length($number))) {
        return $map{"352$prefix"} if exists($map{"352$prefix"});
      }
      return undef;
    }
sub new {
  my $class = shift;
  my $number = shift;
  $number =~ s/(^\+352|\D)//g;
  my $self = bless({ number => $number, formatters => $formatters, validators => $validators }, $class);
  return $self->is_valid() ? $self : undef;
}

1;
