| 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::NE; | ||||||||||
| 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' => '08', | ||||||||||
| 31 | 'pattern' => '(\\d{2})(\\d{3})(\\d{3})' | ||||||||||
| 32 | }, | ||||||||||
| 33 | { | ||||||||||
| 34 | 'format' => '$1 $2 $3 $4', | ||||||||||
| 35 | 'leading_digits' => ' | ||||||||||
| 36 | [089]| | ||||||||||
| 37 | 2[013]| | ||||||||||
| 38 | 7[0467] | ||||||||||
| 39 | ', | ||||||||||
| 40 | 'pattern' => '(\\d{2})(\\d{2})(\\d{2})(\\d{2})' | ||||||||||
| 41 | } | ||||||||||
| 42 | ]; | ||||||||||
| 43 | |||||||||||
| 44 | 2 | my $validators = { | |||||||||
| 45 | 'fixed_line' => ' | ||||||||||
| 46 | 2(?: | ||||||||||
| 47 | 0(?: | ||||||||||
| 48 | 20| | ||||||||||
| 49 | 3[1-8]| | ||||||||||
| 50 | 4[13-5]| | ||||||||||
| 51 | 5[14]| | ||||||||||
| 52 | 6[14578]| | ||||||||||
| 53 | 7[1-578] | ||||||||||
| 54 | )| | ||||||||||
| 55 | 1(?: | ||||||||||
| 56 | 4[145]| | ||||||||||
| 57 | 5[14]| | ||||||||||
| 58 | 6[14-68]| | ||||||||||
| 59 | 7[169]| | ||||||||||
| 60 | 88 | ||||||||||
| 61 | ) | ||||||||||
| 62 | )\\d{4} | ||||||||||
| 63 | ', | ||||||||||
| 64 | 'geographic' => ' | ||||||||||
| 65 | 2(?: | ||||||||||
| 66 | 0(?: | ||||||||||
| 67 | 20| | ||||||||||
| 68 | 3[1-8]| | ||||||||||
| 69 | 4[13-5]| | ||||||||||
| 70 | 5[14]| | ||||||||||
| 71 | 6[14578]| | ||||||||||
| 72 | 7[1-578] | ||||||||||
| 73 | )| | ||||||||||
| 74 | 1(?: | ||||||||||
| 75 | 4[145]| | ||||||||||
| 76 | 5[14]| | ||||||||||
| 77 | 6[14-68]| | ||||||||||
| 78 | 7[169]| | ||||||||||
| 79 | 88 | ||||||||||
| 80 | ) | ||||||||||
| 81 | )\\d{4} | ||||||||||
| 82 | ', | ||||||||||
| 83 | 'mobile' => ' | ||||||||||
| 84 | (?: | ||||||||||
| 85 | 23| | ||||||||||
| 86 | 7[0467]| | ||||||||||
| 87 | [89]\\d | ||||||||||
| 88 | )\\d{6} | ||||||||||
| 89 | ', | ||||||||||
| 90 | 'pager' => '', | ||||||||||
| 91 | 'personal_number' => '', | ||||||||||
| 92 | 'specialrate' => '(09\\d{6})', | ||||||||||
| 93 | 'toll_free' => '08\\d{6}', | ||||||||||
| 94 | 'voip' => '' | ||||||||||
| 95 | }; | ||||||||||
| 96 | 2 | my %areanames = (); | |||||||||
| 97 | 2 | $areanames{en} = {"2272045", "Arlit", | |||||||||
| 98 | "2272071", "Tillabéry", | ||||||||||
| 99 | "2272051", "Zinder", | ||||||||||
| 100 | "2272072", "Niamey", | ||||||||||
| 101 | "2272061", "Tahoua", | ||||||||||
| 102 | "2272065", "Dosso", | ||||||||||
| 103 | "227203", "Niamey", | ||||||||||
| 104 | "2272041", "Maradi", | ||||||||||
| 105 | "2272077", "Filingué", | ||||||||||
| 106 | "2272075", "Niamey", | ||||||||||
| 107 | "2272073", "Niamey", | ||||||||||
| 108 | "2272044", "Agadez", | ||||||||||
| 109 | "227202", "Niamey", | ||||||||||
| 110 | "2272068", "Gaya", | ||||||||||
| 111 | "2272064", "Konni", | ||||||||||
| 112 | "2272078", "Say", | ||||||||||
| 113 | "2272074", "Niamey", | ||||||||||
| 114 | "2272054", "Diffa",}; | ||||||||||
| 115 | 2 | my $timezones = { | |||||||||
| 116 | '' => [ | ||||||||||
| 117 | 'Africa/Niamey' | ||||||||||
| 118 | ] | ||||||||||
| 119 | }; | ||||||||||
| 120 | |||||||||||
| 121 | 13 | ▶ | sub new { | ||||||||
|
Subroutine
new: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||
| 122 | 13 | my $class = shift; | |||||||||
| 123 | 13 | my $number = shift; | |||||||||
| 124 | 13 | $number =~ s/(^\+227|\D)//g; | |||||||||
| 125 | 13 | my $self = bless({ country_code => '227', number => $number, formatters => $formatters, validators => $validators, timezones => $timezones, areanames => \%areanames}, $class); | |||||||||
| 126 | 13 | ▶ | return $self->is_valid() ? $self : undef; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 127 | } | ||||||||||
| 128 | 2 | 1; | |||||||||