| 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::SY; | ||||||||||
| 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.20260904101551; | |||||||||
| 26 | |||||||||||
| 27 | 2 | my $formatters = [ | |||||||||
| 28 | { | ||||||||||
| 29 | 'format' => '$1 $2 $3', | ||||||||||
| 30 | 'leading_digits' => ' | ||||||||||
| 31 | [1-4]| | ||||||||||
| 32 | 5[1-3] | ||||||||||
| 33 | ', | ||||||||||
| 34 | 'national_rule' => '0$1', | ||||||||||
| 35 | 'pattern' => '(\\d{2})(\\d{3})(\\d{3,4})' | ||||||||||
| 36 | }, | ||||||||||
| 37 | { | ||||||||||
| 38 | 'format' => '$1 $2 $3', | ||||||||||
| 39 | 'leading_digits' => '[59]', | ||||||||||
| 40 | 'national_rule' => '0$1', | ||||||||||
| 41 | 'pattern' => '(\\d{3})(\\d{3})(\\d{3})' | ||||||||||
| 42 | } | ||||||||||
| 43 | ]; | ||||||||||
| 44 | |||||||||||
| 45 | 2 | my $validators = { | |||||||||
| 46 | 'fixed_line' => ' | ||||||||||
| 47 | (?: | ||||||||||
| 48 | 1(?: | ||||||||||
| 49 | [1478]\\d| | ||||||||||
| 50 | [2356] | ||||||||||
| 51 | )| | ||||||||||
| 52 | 21\\d| | ||||||||||
| 53 | 3(?: | ||||||||||
| 54 | [13]\\d| | ||||||||||
| 55 | 4 | ||||||||||
| 56 | )| | ||||||||||
| 57 | 4[134]| | ||||||||||
| 58 | 5[1-3] | ||||||||||
| 59 | )\\d{6}| | ||||||||||
| 60 | 2[1-5]\\d{6} | ||||||||||
| 61 | ', | ||||||||||
| 62 | 'geographic' => ' | ||||||||||
| 63 | (?: | ||||||||||
| 64 | 1(?: | ||||||||||
| 65 | [1478]\\d| | ||||||||||
| 66 | [2356] | ||||||||||
| 67 | )| | ||||||||||
| 68 | 21\\d| | ||||||||||
| 69 | 3(?: | ||||||||||
| 70 | [13]\\d| | ||||||||||
| 71 | 4 | ||||||||||
| 72 | )| | ||||||||||
| 73 | 4[134]| | ||||||||||
| 74 | 5[1-3] | ||||||||||
| 75 | )\\d{6}| | ||||||||||
| 76 | 2[1-5]\\d{6} | ||||||||||
| 77 | ', | ||||||||||
| 78 | 'mobile' => ' | ||||||||||
| 79 | (?: | ||||||||||
| 80 | 50| | ||||||||||
| 81 | 9[03-689] | ||||||||||
| 82 | )\\d{7} | ||||||||||
| 83 | ', | ||||||||||
| 84 | 'pager' => '', | ||||||||||
| 85 | 'personal_number' => '', | ||||||||||
| 86 | 'specialrate' => '', | ||||||||||
| 87 | 'toll_free' => '', | ||||||||||
| 88 | 'voip' => '' | ||||||||||
| 89 | }; | ||||||||||
| 90 | 2 | my %areanames = (); | |||||||||
| 91 | 2 | $areanames{en} = {"96321", "Aleppo", | |||||||||
| 92 | "96333", "Hamah", | ||||||||||
| 93 | "96318", "Tartus", | ||||||||||
| 94 | "96334", "Palmyra", | ||||||||||
| 95 | "96315", "Dara", | ||||||||||
| 96 | "96331", "Homs", | ||||||||||
| 97 | "96322", "Al\-Rakkah", | ||||||||||
| 98 | "96323", "Edleb", | ||||||||||
| 99 | "96316", "Al\-Swedaa", | ||||||||||
| 100 | "96324", "Deir\ ezZor", | ||||||||||
| 101 | "96325", "Menbej", | ||||||||||
| 102 | "96312", "Al\-Nebek", | ||||||||||
| 103 | "96313", "Al\-Zabadani", | ||||||||||
| 104 | "96351", "Deir\ Ezzour", | ||||||||||
| 105 | "96344", "Hamah", | ||||||||||
| 106 | "96343", "Tartous", | ||||||||||
| 107 | "96314", "Al\-Quneitra", | ||||||||||
| 108 | "96311", "Damascus\ and\ rural\ areas", | ||||||||||
| 109 | "96353", "Al\-Kameshli", | ||||||||||
| 110 | "96352", "Alhasakah", | ||||||||||
| 111 | "96341", "Lattakia", | ||||||||||
| 112 | "96317", "Latakia",}; | ||||||||||
| 113 | 2 | my $timezones = { | |||||||||
| 114 | '' => [ | ||||||||||
| 115 | 'Asia/Damascus' | ||||||||||
| 116 | ] | ||||||||||
| 117 | }; | ||||||||||
| 118 | |||||||||||
| 119 | 7 | ▶ | sub new { | ||||||||
|
Subroutine
new: called CC=3 SCAR=11.0
Pod
documented
| |||||||||||
| 120 | 7 | my $class = shift; | |||||||||
| 121 | 7 | my $number = shift; | |||||||||
| 122 | 7 | $number =~ s/(^\+963|\D)//g; | |||||||||
| 123 | 7 | my $self = bless({ country_code => '963', number => $number, formatters => $formatters, validators => $validators, timezones => $timezones, areanames => \%areanames}, $class); | |||||||||
| 124 | 7 | ▶ | return $self if ($self->is_valid()); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 125 | 1 | $number =~ s/^(?:0)//; | |||||||||
| 126 | 1 | $self = bless({ country_code => '963', number => $number, formatters => $formatters, validators => $validators, areanames => \%areanames}, $class); | |||||||||
| 127 | 1 | ▶ | return $self->is_valid() ? $self : undef; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 128 | } | ||||||||||
| 129 | 2 | 1; | |||||||||