| 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::CZ; | ||||||||||
| 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 $3', | ||||||||||
| 30 | 'leading_digits' => ' | ||||||||||
| 31 | [2-8]| | ||||||||||
| 32 | 9[015-7] | ||||||||||
| 33 | ', | ||||||||||
| 34 | 'pattern' => '(\\d{3})(\\d{3})(\\d{3})' | ||||||||||
| 35 | }, | ||||||||||
| 36 | { | ||||||||||
| 37 | 'format' => '$1 $2 $3 $4', | ||||||||||
| 38 | 'leading_digits' => '96', | ||||||||||
| 39 | 'pattern' => '(\\d{2})(\\d{3})(\\d{3})(\\d{2})' | ||||||||||
| 40 | }, | ||||||||||
| 41 | { | ||||||||||
| 42 | 'format' => '$1 $2 $3 $4', | ||||||||||
| 43 | 'leading_digits' => '9', | ||||||||||
| 44 | 'pattern' => '(\\d{2})(\\d{3})(\\d{3})(\\d{3})' | ||||||||||
| 45 | }, | ||||||||||
| 46 | { | ||||||||||
| 47 | 'format' => '$1 $2 $3 $4', | ||||||||||
| 48 | 'leading_digits' => '9', | ||||||||||
| 49 | 'pattern' => '(\\d{3})(\\d{3})(\\d{3})(\\d{3})' | ||||||||||
| 50 | } | ||||||||||
| 51 | ]; | ||||||||||
| 52 | |||||||||||
| 53 | 2 | my $validators = { | |||||||||
| 54 | 'fixed_line' => ' | ||||||||||
| 55 | (?: | ||||||||||
| 56 | 2\\d| | ||||||||||
| 57 | 3[1257-9]| | ||||||||||
| 58 | 4[16-9]| | ||||||||||
| 59 | 5[13-9] | ||||||||||
| 60 | )\\d{7} | ||||||||||
| 61 | ', | ||||||||||
| 62 | 'geographic' => ' | ||||||||||
| 63 | (?: | ||||||||||
| 64 | 2\\d| | ||||||||||
| 65 | 3[1257-9]| | ||||||||||
| 66 | 4[16-9]| | ||||||||||
| 67 | 5[13-9] | ||||||||||
| 68 | )\\d{7} | ||||||||||
| 69 | ', | ||||||||||
| 70 | 'mobile' => ' | ||||||||||
| 71 | 7060\\d{5}| | ||||||||||
| 72 | (?: | ||||||||||
| 73 | 60[1-8]| | ||||||||||
| 74 | 7(?: | ||||||||||
| 75 | 0[2-5]| | ||||||||||
| 76 | 19| | ||||||||||
| 77 | [2379]\\d | ||||||||||
| 78 | ) | ||||||||||
| 79 | )\\d{6} | ||||||||||
| 80 | ', | ||||||||||
| 81 | 'pager' => '', | ||||||||||
| 82 | 'personal_number' => '70[01]\\d{6}', | ||||||||||
| 83 | 'specialrate' => '(8[134]\\d{7})|( | ||||||||||
| 84 | 9(?: | ||||||||||
| 85 | 0[05689]| | ||||||||||
| 86 | 76 | ||||||||||
| 87 | )\\d{6} | ||||||||||
| 88 | )|( | ||||||||||
| 89 | 9(?: | ||||||||||
| 90 | 5\\d| | ||||||||||
| 91 | 7[2-4] | ||||||||||
| 92 | )\\d{6} | ||||||||||
| 93 | )', | ||||||||||
| 94 | 'toll_free' => '800\\d{6}', | ||||||||||
| 95 | 'voip' => '9[17]0\\d{6}' | ||||||||||
| 96 | }; | ||||||||||
| 97 | 2 | my %areanames = (); | |||||||||
| 98 | 2 | $areanames{en} = {"42054", "South\ Moravian\ Region", | |||||||||
| 99 | "42041", "Ústí\ nad\ Labem\ Region", | ||||||||||
| 100 | "42059", "Moravian\-Silesian\ Region", | ||||||||||
| 101 | "42037", "Plzeň\ Region", | ||||||||||
| 102 | "42031", "Central\ Bohemian\ Region", | ||||||||||
| 103 | "42058", "Olomouc\ Region", | ||||||||||
| 104 | "42053", "South\ Moravian\ Region", | ||||||||||
| 105 | "42035", "Karlovy\ Vary\ Region", | ||||||||||
| 106 | "42047", "Ústí\ nad\ Labem\ Region", | ||||||||||
| 107 | "42046", "Pardubice\ Region", | ||||||||||
| 108 | "42056", "Vysočina\ Region", | ||||||||||
| 109 | "42057", "Zlín\ Region", | ||||||||||
| 110 | "42039", "South\ Bohemian\ Region", | ||||||||||
| 111 | "4202", "Prague", | ||||||||||
| 112 | "42048", "Liberec\ Region", | ||||||||||
| 113 | "42032", "Central\ Bohemian\ Region", | ||||||||||
| 114 | "42049", "Hradec\ Králové\ Region", | ||||||||||
| 115 | "42055", "Moravian\-Silesian\ Region", | ||||||||||
| 116 | "42038", "South\ Bohemian\ Region", | ||||||||||
| 117 | "42051", "South\ Moravian\ Region",}; | ||||||||||
| 118 | 2 | my $timezones = { | |||||||||
| 119 | '' => [ | ||||||||||
| 120 | 'Europe/Prague' | ||||||||||
| 121 | ] | ||||||||||
| 122 | }; | ||||||||||
| 123 | |||||||||||
| 124 | 25 | ▶ | sub new { | ||||||||
|
Subroutine
new: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||
| 125 | 25 | my $class = shift; | |||||||||
| 126 | 25 | my $number = shift; | |||||||||
| 127 | 25 | $number =~ s/(^\+420|\D)//g; | |||||||||
| 128 | 25 | my $self = bless({ country_code => '420', number => $number, formatters => $formatters, validators => $validators, timezones => $timezones, areanames => \%areanames}, $class); | |||||||||
| 129 | 25 | ▶ | return $self->is_valid() ? $self : undef; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 130 | } | ||||||||||
| 131 | 2 | 1; | |||||||||