| 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::EE; | ||||||||||
| 20 | 2 | ▶ | use base qw(Number::Phone::StubCountry); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 21 | |||||||||||
| 22 | 2 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 23 | 2 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 24 | 2 | ▶ | use utf8; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 25 | 2 | our $VERSION = 1.20260904101549; | |||||||||
| 26 | |||||||||||
| 27 | 2 | my $formatters = [ | |||||||||
| 28 | { | ||||||||||
| 29 | 'format' => '$1 $2', | ||||||||||
| 30 | 'leading_digits' => ' | ||||||||||
| 31 | [369]| | ||||||||||
| 32 | 4[3-8]| | ||||||||||
| 33 | 5(?: | ||||||||||
| 34 | [02]| | ||||||||||
| 35 | 1(?: | ||||||||||
| 36 | [0-8]| | ||||||||||
| 37 | 95 | ||||||||||
| 38 | )| | ||||||||||
| 39 | 5[0-478]| | ||||||||||
| 40 | 6(?: | ||||||||||
| 41 | 4[0-4]| | ||||||||||
| 42 | 5[1-589] | ||||||||||
| 43 | ) | ||||||||||
| 44 | )| | ||||||||||
| 45 | 7[1-9]| | ||||||||||
| 46 | 88 | ||||||||||
| 47 | ', | ||||||||||
| 48 | 'pattern' => '(\\d{3})(\\d{4})' | ||||||||||
| 49 | }, | ||||||||||
| 50 | { | ||||||||||
| 51 | 'format' => '$1 $2', | ||||||||||
| 52 | 'leading_digits' => ' | ||||||||||
| 53 | [45]| | ||||||||||
| 54 | 8(?: | ||||||||||
| 55 | 00[1-9]| | ||||||||||
| 56 | [1-49] | ||||||||||
| 57 | ) | ||||||||||
| 58 | ', | ||||||||||
| 59 | 'pattern' => '(\\d{4})(\\d{3,4})' | ||||||||||
| 60 | }, | ||||||||||
| 61 | { | ||||||||||
| 62 | 'format' => '$1 $2 $3', | ||||||||||
| 63 | 'leading_digits' => '7', | ||||||||||
| 64 | 'pattern' => '(\\d{2})(\\d{2})(\\d{4})' | ||||||||||
| 65 | }, | ||||||||||
| 66 | { | ||||||||||
| 67 | 'format' => '$1 $2 $3', | ||||||||||
| 68 | 'leading_digits' => '8', | ||||||||||
| 69 | 'pattern' => '(\\d{4})(\\d{3})(\\d{3})' | ||||||||||
| 70 | } | ||||||||||
| 71 | ]; | ||||||||||
| 72 | |||||||||||
| 73 | 2 | my $validators = { | |||||||||
| 74 | 'fixed_line' => ' | ||||||||||
| 75 | (?: | ||||||||||
| 76 | 3[23589]| | ||||||||||
| 77 | 4[3-8]| | ||||||||||
| 78 | 6\\d| | ||||||||||
| 79 | 7[1-9]| | ||||||||||
| 80 | 88 | ||||||||||
| 81 | )\\d{5} | ||||||||||
| 82 | ', | ||||||||||
| 83 | 'geographic' => ' | ||||||||||
| 84 | (?: | ||||||||||
| 85 | 3[23589]| | ||||||||||
| 86 | 4[3-8]| | ||||||||||
| 87 | 6\\d| | ||||||||||
| 88 | 7[1-9]| | ||||||||||
| 89 | 88 | ||||||||||
| 90 | )\\d{5} | ||||||||||
| 91 | ', | ||||||||||
| 92 | 'mobile' => ' | ||||||||||
| 93 | (?: | ||||||||||
| 94 | 5\\d{5}| | ||||||||||
| 95 | 8(?: | ||||||||||
| 96 | 1(?: | ||||||||||
| 97 | 0(?: | ||||||||||
| 98 | 0(?: | ||||||||||
| 99 | 00| | ||||||||||
| 100 | [178]\\d | ||||||||||
| 101 | )| | ||||||||||
| 102 | [3-9]\\d\\d | ||||||||||
| 103 | )| | ||||||||||
| 104 | (?: | ||||||||||
| 105 | 1(?: | ||||||||||
| 106 | 0[2-6]| | ||||||||||
| 107 | 1\\d | ||||||||||
| 108 | )| | ||||||||||
| 109 | [2-79]\\d\\d | ||||||||||
| 110 | )\\d | ||||||||||
| 111 | )| | ||||||||||
| 112 | 2(?: | ||||||||||
| 113 | 0(?: | ||||||||||
| 114 | 0(?: | ||||||||||
| 115 | 00| | ||||||||||
| 116 | 4\\d | ||||||||||
| 117 | )| | ||||||||||
| 118 | (?: | ||||||||||
| 119 | 19| | ||||||||||
| 120 | [2-7]\\d | ||||||||||
| 121 | )\\d | ||||||||||
| 122 | )| | ||||||||||
| 123 | (?: | ||||||||||
| 124 | (?: | ||||||||||
| 125 | [124-69]\\d| | ||||||||||
| 126 | 3[5-9] | ||||||||||
| 127 | )\\d| | ||||||||||
| 128 | 7(?: | ||||||||||
| 129 | [0-79]\\d| | ||||||||||
| 130 | 8[013-9] | ||||||||||
| 131 | )| | ||||||||||
| 132 | 8(?: | ||||||||||
| 133 | [2-6]\\d| | ||||||||||
| 134 | 7[01] | ||||||||||
| 135 | ) | ||||||||||
| 136 | )\\d | ||||||||||
| 137 | )| | ||||||||||
| 138 | [349]\\d{4} | ||||||||||
| 139 | ) | ||||||||||
| 140 | )\\d\\d| | ||||||||||
| 141 | 5(?: | ||||||||||
| 142 | (?: | ||||||||||
| 143 | [02]\\d| | ||||||||||
| 144 | 5[0-478] | ||||||||||
| 145 | )\\d| | ||||||||||
| 146 | 1(?: | ||||||||||
| 147 | [0-8]\\d| | ||||||||||
| 148 | 95 | ||||||||||
| 149 | )| | ||||||||||
| 150 | 6(?: | ||||||||||
| 151 | 4[0-4]| | ||||||||||
| 152 | 5[1-589] | ||||||||||
| 153 | ) | ||||||||||
| 154 | )\\d{3} | ||||||||||
| 155 | ', | ||||||||||
| 156 | 'pager' => '', | ||||||||||
| 157 | 'personal_number' => '70[0-2]\\d{5}', | ||||||||||
| 158 | 'specialrate' => '( | ||||||||||
| 159 | (?: | ||||||||||
| 160 | 40\\d\\d| | ||||||||||
| 161 | 900 | ||||||||||
| 162 | )\\d{4} | ||||||||||
| 163 | )', | ||||||||||
| 164 | 'toll_free' => ' | ||||||||||
| 165 | 800(?: | ||||||||||
| 166 | (?: | ||||||||||
| 167 | 0\\d\\d| | ||||||||||
| 168 | 1 | ||||||||||
| 169 | )\\d| | ||||||||||
| 170 | [2-9] | ||||||||||
| 171 | )\\d{3} | ||||||||||
| 172 | ', | ||||||||||
| 173 | 'voip' => '' | ||||||||||
| 174 | }; | ||||||||||
| 175 | 2 | my $timezones = { | |||||||||
| 176 | '' => [ | ||||||||||
| 177 | 'Europe/Bucharest' | ||||||||||
| 178 | ] | ||||||||||
| 179 | }; | ||||||||||
| 180 | |||||||||||
| 181 | 16 | ▶ | sub new { | ||||||||
|
Subroutine
new: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||
| 182 | 16 | my $class = shift; | |||||||||
| 183 | 16 | my $number = shift; | |||||||||
| 184 | 16 | $number =~ s/(^\+372|\D)//g; | |||||||||
| 185 | 16 | my $self = bless({ country_code => '372', number => $number, formatters => $formatters, validators => $validators, timezones => $timezones, }, $class); | |||||||||
| 186 | 16 | ▶ | return $self->is_valid() ? $self : undef; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 187 | } | ||||||||||
| 188 | 2 | 1; | |||||||||