| 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::BF; | ||||||||||
| 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.20260904101547; | |||||||||
| 26 | |||||||||||
| 27 | 2 | my $formatters = [ | |||||||||
| 28 | { | ||||||||||
| 29 | 'format' => '$1 $2 $3 $4', | ||||||||||
| 30 | 'leading_digits' => '[024-7]', | ||||||||||
| 31 | 'pattern' => '(\\d{2})(\\d{2})(\\d{2})(\\d{2})' | ||||||||||
| 32 | } | ||||||||||
| 33 | ]; | ||||||||||
| 34 | |||||||||||
| 35 | 2 | my $validators = { | |||||||||
| 36 | 'fixed_line' => ' | ||||||||||
| 37 | 2(?: | ||||||||||
| 38 | 0(?: | ||||||||||
| 39 | 49| | ||||||||||
| 40 | 5[23]| | ||||||||||
| 41 | 6[5-7]| | ||||||||||
| 42 | 9[016-9] | ||||||||||
| 43 | )| | ||||||||||
| 44 | 4(?: | ||||||||||
| 45 | 4[569]| | ||||||||||
| 46 | 5[4-6]| | ||||||||||
| 47 | 6[5-7]| | ||||||||||
| 48 | 7[0179] | ||||||||||
| 49 | )| | ||||||||||
| 50 | 5(?: | ||||||||||
| 51 | [34]\\d| | ||||||||||
| 52 | 50| | ||||||||||
| 53 | 6[5-8] | ||||||||||
| 54 | ) | ||||||||||
| 55 | )\\d{4} | ||||||||||
| 56 | ', | ||||||||||
| 57 | 'geographic' => ' | ||||||||||
| 58 | 2(?: | ||||||||||
| 59 | 0(?: | ||||||||||
| 60 | 49| | ||||||||||
| 61 | 5[23]| | ||||||||||
| 62 | 6[5-7]| | ||||||||||
| 63 | 9[016-9] | ||||||||||
| 64 | )| | ||||||||||
| 65 | 4(?: | ||||||||||
| 66 | 4[569]| | ||||||||||
| 67 | 5[4-6]| | ||||||||||
| 68 | 6[5-7]| | ||||||||||
| 69 | 7[0179] | ||||||||||
| 70 | )| | ||||||||||
| 71 | 5(?: | ||||||||||
| 72 | [34]\\d| | ||||||||||
| 73 | 50| | ||||||||||
| 74 | 6[5-8] | ||||||||||
| 75 | ) | ||||||||||
| 76 | )\\d{4} | ||||||||||
| 77 | ', | ||||||||||
| 78 | 'mobile' => ' | ||||||||||
| 79 | (?: | ||||||||||
| 80 | 0[1-7]| | ||||||||||
| 81 | 4[4-6]| | ||||||||||
| 82 | 5[0-8]| | ||||||||||
| 83 | [67]\\d | ||||||||||
| 84 | )\\d{6} | ||||||||||
| 85 | ', | ||||||||||
| 86 | 'pager' => '', | ||||||||||
| 87 | 'personal_number' => '', | ||||||||||
| 88 | 'specialrate' => '', | ||||||||||
| 89 | 'toll_free' => '', | ||||||||||
| 90 | 'voip' => '' | ||||||||||
| 91 | }; | ||||||||||
| 92 | 2 | my %areanames = (); | |||||||||
| 93 | 2 | $areanames{en} = {"2262099", "Béréba\/Fo\/Houndé", | |||||||||
| 94 | "2262541", "Léo\/Sapouy", | ||||||||||
| 95 | "2262091", "Banfora", | ||||||||||
| 96 | "2262454", "Yako", | ||||||||||
| 97 | "2262097", "Bobo\-Dioulasso", | ||||||||||
| 98 | "2262456", "Djibo", | ||||||||||
| 99 | "2262470", "Pouytenga\/Koupéla", | ||||||||||
| 100 | "2262544", "Koudougou", | ||||||||||
| 101 | "226254", "Ouagadougou", | ||||||||||
| 102 | "2262455", "Ouahigouya", | ||||||||||
| 103 | "2262098", "Bobo\-Dioulasso", | ||||||||||
| 104 | "2262096", "Orodara", | ||||||||||
| 105 | "2262540", "Pô\/Kombissiri\/Koubri", | ||||||||||
| 106 | "2262090", "Gaoua", | ||||||||||
| 107 | "2262446", "Falagountou\/Dori", | ||||||||||
| 108 | "226253", "Ouagadougou", | ||||||||||
| 109 | "2262053", "Boromo\/Djibasso\/Nouna", | ||||||||||
| 110 | "226204", "Kaya", | ||||||||||
| 111 | "2262479", "Kantchari", | ||||||||||
| 112 | "2262445", "Kaya", | ||||||||||
| 113 | "2262471", "Tenkodogo", | ||||||||||
| 114 | "2262477", "Fada\/Diabo", | ||||||||||
| 115 | "2262052", "Dédougou", | ||||||||||
| 116 | "2262449", "Falagountou\/Dori",}; | ||||||||||
| 117 | 2 | my $timezones = { | |||||||||
| 118 | '' => [ | ||||||||||
| 119 | 'Africa/Ouagadougou' | ||||||||||
| 120 | ] | ||||||||||
| 121 | }; | ||||||||||
| 122 | |||||||||||
| 123 | 7 | ▶ | sub new { | ||||||||
|
Subroutine
new: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||
| 124 | 7 | my $class = shift; | |||||||||
| 125 | 7 | my $number = shift; | |||||||||
| 126 | 7 | $number =~ s/(^\+226|\D)//g; | |||||||||
| 127 | 7 | my $self = bless({ country_code => '226', number => $number, formatters => $formatters, validators => $validators, timezones => $timezones, areanames => \%areanames}, $class); | |||||||||
| 128 | 7 | ▶ | return $self->is_valid() ? $self : undef; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 129 | } | ||||||||||
| 130 | 2 | 1; | |||||||||