« blib/lib/Number/Phone/StubCountry/InternationalNetworks882.pm
↑ Summary
blib/lib/Number/Phone/StubCountry/InternationalPremiumRate.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::InternationalNetworks883; | ||||||||||
| 20 | 3 | ▶ | use base qw(Number::Phone::StubCountry); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 21 | |||||||||||
| 22 | 3 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 23 | 3 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 24 | 3 | ▶ | use utf8; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 25 | 3 | our $VERSION = 1.20260904101552; | |||||||||
| 26 | |||||||||||
| 27 | 3 | my $formatters = [ | |||||||||
| 28 | { | ||||||||||
| 29 | 'format' => '$1 $2 $3', | ||||||||||
| 30 | 'leading_digits' => ' | ||||||||||
| 31 | [14]| | ||||||||||
| 32 | 2[24-689]| | ||||||||||
| 33 | 3[02-689]| | ||||||||||
| 34 | 51[24-9] | ||||||||||
| 35 | ', | ||||||||||
| 36 | 'pattern' => '(\\d{3})(\\d{3})(\\d{2,8})' | ||||||||||
| 37 | }, | ||||||||||
| 38 | { | ||||||||||
| 39 | 'format' => '$1 $2 $3', | ||||||||||
| 40 | 'leading_digits' => '510', | ||||||||||
| 41 | 'pattern' => '(\\d{3})(\\d{3})(\\d{3})' | ||||||||||
| 42 | }, | ||||||||||
| 43 | { | ||||||||||
| 44 | 'format' => '$1 $2 $3', | ||||||||||
| 45 | 'leading_digits' => '21', | ||||||||||
| 46 | 'pattern' => '(\\d{3})(\\d{3})(\\d{4})' | ||||||||||
| 47 | }, | ||||||||||
| 48 | { | ||||||||||
| 49 | 'format' => '$1 $2 $3', | ||||||||||
| 50 | 'leading_digits' => '51[13]', | ||||||||||
| 51 | 'pattern' => '(\\d{4})(\\d{4})(\\d{4})' | ||||||||||
| 52 | }, | ||||||||||
| 53 | { | ||||||||||
| 54 | 'format' => '$1 $2 $3 $4', | ||||||||||
| 55 | 'leading_digits' => '[235]', | ||||||||||
| 56 | 'pattern' => '(\\d{3})(\\d{3})(\\d{3})(\\d{3})' | ||||||||||
| 57 | } | ||||||||||
| 58 | ]; | ||||||||||
| 59 | |||||||||||
| 60 | 3 | my $validators = { | |||||||||
| 61 | 'fixed_line' => '', | ||||||||||
| 62 | 'geographic' => '', | ||||||||||
| 63 | 'mobile' => '', | ||||||||||
| 64 | 'pager' => '', | ||||||||||
| 65 | 'personal_number' => '', | ||||||||||
| 66 | 'specialrate' => '', | ||||||||||
| 67 | 'toll_free' => '', | ||||||||||
| 68 | 'voip' => ' | ||||||||||
| 69 | (?: | ||||||||||
| 70 | 2(?: | ||||||||||
| 71 | 00\\d\\d| | ||||||||||
| 72 | 10 | ||||||||||
| 73 | )| | ||||||||||
| 74 | (?: | ||||||||||
| 75 | 370[1-9]| | ||||||||||
| 76 | 51\\d0 | ||||||||||
| 77 | )\\d | ||||||||||
| 78 | )\\d{7}| | ||||||||||
| 79 | 51(?: | ||||||||||
| 80 | 00\\d{5}| | ||||||||||
| 81 | [24-9]0\\d{4,7} | ||||||||||
| 82 | )| | ||||||||||
| 83 | (?: | ||||||||||
| 84 | 1[0-79]| | ||||||||||
| 85 | 2[24-689]| | ||||||||||
| 86 | 3[02-689]| | ||||||||||
| 87 | 4[0-4] | ||||||||||
| 88 | )0\\d{5,9} | ||||||||||
| 89 | ' | ||||||||||
| 90 | }; | ||||||||||
| 91 | 3 | my $timezones = {}; | |||||||||
| 92 | |||||||||||
| 93 | 19 | ▶ | sub new { | ||||||||
|
Subroutine
new: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||
| 94 | 19 | my $class = shift; | |||||||||
| 95 | 19 | my $number = shift; | |||||||||
| 96 | 19 | $number =~ s/(^\+883|\D)//g; | |||||||||
| 97 | 19 | my $self = bless({ country_code => '883', number => $number, formatters => $formatters, validators => $validators, timezones => $timezones, }, $class); | |||||||||
| 98 | 19 | ▶ | return $self->is_valid() ? $self : undef; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 99 | } | ||||||||||
| 100 | 3 | 1; | |||||||||