line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# automatically generated file, don't edit |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
# Copyright 2023 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
|
|
|
2
|
|
1131
|
use base qw(Number::Phone::StubCountry); |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
229
|
|
21
|
|
|
|
|
|
|
|
22
|
2
|
|
|
2
|
|
15
|
use strict; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
44
|
|
23
|
2
|
|
|
2
|
|
16
|
use warnings; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
51
|
|
24
|
2
|
|
|
2
|
|
15
|
use utf8; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
11
|
|
25
|
|
|
|
|
|
|
our $VERSION = 1.20230903131441; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
my $formatters = [ |
28
|
|
|
|
|
|
|
{ |
29
|
|
|
|
|
|
|
'format' => '$1 $2 $3 $4', |
30
|
|
|
|
|
|
|
'leading_digits' => '[025-7]', |
31
|
|
|
|
|
|
|
'pattern' => '(\\d{2})(\\d{2})(\\d{2})(\\d{2})' |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
]; |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
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-7] |
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-7] |
75
|
|
|
|
|
|
|
) |
76
|
|
|
|
|
|
|
)\\d{4} |
77
|
|
|
|
|
|
|
', |
78
|
|
|
|
|
|
|
'mobile' => ' |
79
|
|
|
|
|
|
|
(?: |
80
|
|
|
|
|
|
|
0[1-35-7]| |
81
|
|
|
|
|
|
|
5[0-8]| |
82
|
|
|
|
|
|
|
[67]\\d |
83
|
|
|
|
|
|
|
)\\d{6} |
84
|
|
|
|
|
|
|
', |
85
|
|
|
|
|
|
|
'pager' => '', |
86
|
|
|
|
|
|
|
'personal_number' => '', |
87
|
|
|
|
|
|
|
'specialrate' => '', |
88
|
|
|
|
|
|
|
'toll_free' => '', |
89
|
|
|
|
|
|
|
'voip' => '' |
90
|
|
|
|
|
|
|
}; |
91
|
|
|
|
|
|
|
my %areanames = (); |
92
|
|
|
|
|
|
|
$areanames{en} = {"2262540", "Pô\/Kombissiri\/Koubri", |
93
|
|
|
|
|
|
|
"2262090", "Gaoua", |
94
|
|
|
|
|
|
|
"2262449", "Falagountou\/Dori", |
95
|
|
|
|
|
|
|
"2262477", "Fada\/Diabo", |
96
|
|
|
|
|
|
|
"2262544", "Koudougou", |
97
|
|
|
|
|
|
|
"2262097", "Bobo\-Dioulasso", |
98
|
|
|
|
|
|
|
"2262470", "Pouytenga\/Koupéla", |
99
|
|
|
|
|
|
|
"2262096", "Orodara", |
100
|
|
|
|
|
|
|
"2262053", "Boromo\/Djibasso\/Nouna", |
101
|
|
|
|
|
|
|
"2262099", "Béréba\/Fo\/Houndé", |
102
|
|
|
|
|
|
|
"2262052", "Dédougou", |
103
|
|
|
|
|
|
|
"2262541", "Léo\/Sapouy", |
104
|
|
|
|
|
|
|
"2262091", "Banfora", |
105
|
|
|
|
|
|
|
"226254", "Ouagadougou", |
106
|
|
|
|
|
|
|
"2262446", "Falagountou\/Dori", |
107
|
|
|
|
|
|
|
"2262454", "Yako", |
108
|
|
|
|
|
|
|
"2262471", "Tenkodogo", |
109
|
|
|
|
|
|
|
"226204", "Kaya", |
110
|
|
|
|
|
|
|
"2262445", "Kaya", |
111
|
|
|
|
|
|
|
"2262455", "Ouahigouya", |
112
|
|
|
|
|
|
|
"226253", "Ouagadougou", |
113
|
|
|
|
|
|
|
"2262098", "Bobo\-Dioulasso", |
114
|
|
|
|
|
|
|
"2262456", "Djibo", |
115
|
|
|
|
|
|
|
"2262479", "Kantchari",}; |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
sub new { |
118
|
7
|
|
|
7
|
1
|
18
|
my $class = shift; |
119
|
7
|
|
|
|
|
11
|
my $number = shift; |
120
|
7
|
|
|
|
|
41
|
$number =~ s/(^\+226|\D)//g; |
121
|
7
|
|
|
|
|
41
|
my $self = bless({ country_code => '226', number => $number, formatters => $formatters, validators => $validators, areanames => \%areanames}, $class); |
122
|
7
|
100
|
|
|
|
37
|
return $self->is_valid() ? $self : undef; |
123
|
|
|
|
|
|
|
} |
124
|
|
|
|
|
|
|
1; |