# 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::MM;
use base qw(Number::Phone::StubCountry);
use strict;
use warnings;
use utf8;
our $VERSION = 1.20161206201833;
my $formatters = [
{
'leading_digits' => '
1|
2[245]
',
'pattern' => '(\\d)(\\d{3})(\\d{3,4})'
},
{
'pattern' => '(2)(\\d{4})(\\d{4})',
'leading_digits' => '251'
},
{
'pattern' => '(\\d)(\\d{2})(\\d{3})',
'leading_digits' => '
16|
2
'
},
{
'leading_digits' => '
67|
81
',
'pattern' => '(\\d{2})(\\d{3})(\\d{3,4})'
},
{
'leading_digits' => '[4-8]',
'pattern' => '(\\d{2})(\\d{2})(\\d{3,4})'
},
{
'pattern' => '(9)(\\d{3})(\\d{4,6})',
'leading_digits' => '
9(?:
2[0-4]|
[35-9]|
4[137-9]
)
'
},
{
'leading_digits' => '
9(?:
3[0-36]|
4[0-57-9]
)
',
'pattern' => '(9)([34]\\d{4})(\\d{4})'
},
{
'leading_digits' => '92[56]',
'pattern' => '(9)(\\d{3})(\\d{3})(\\d{3})'
},
{
'leading_digits' => '93',
'pattern' => '(9)(\\d{3})(\\d{3})(\\d{2})'
}
];
my $validators = {
'personal_number' => '',
'pager' => '',
'specialrate' => '',
'voip' => '1333\\d{4}',
'geographic' => '
1(?:
2\\d{1,2}|
[3-5]\\d|
6\\d?|
[89][0-6]\\d
)\\d{4}|
2(?:
2(?:
000\\d{3}|
\\d{4}
)|
3\\d{4}|
4(?:
0\\d{5}|
\\d{4}
)|
5(?:
1\\d{3,6}|
[02-9]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(?:
[0-4]|
5\\d{2}|
6[0-5]\\d
)|
3[0-36]\\d|
4(?:
0[0-4]\\d|
[1379]\\d|
2\\d{2}|
4[0-589]\\d|
5\\d{2}|
88
)|
5[0-6]|
61?\\d|
7(?:
3\\d|
[789]\\d{2}
)|
8\\d|
9(?:
1\\d|
[67]\\d{2}|
[089]
)
)\\d{5}
',
'toll_free' => ''
};
my %areanames = (
9522000 => "Mingalar\ Mandalay",
955645 => "Tandar",
9582320 => "Manton",
);
sub new {
my $class = shift;
my $number = shift;
$number =~ s/(^\+95|\D)//g;
my $self = bless({ number => $number, formatters => $formatters, validators => $validators, areanames => \%areanames}, $class);
return $self if ($self->is_valid());
$number =~ s/(^0)//g;
$self = bless({ number => $number, formatters => $formatters, validators => $validators, areanames => \%areanames}, $class);
return $self->is_valid() ? $self : undef;
}
1;