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::FR; |
20
|
3
|
|
|
3
|
|
1874
|
use base qw(Number::Phone::StubCountry); |
|
3
|
|
|
|
|
11
|
|
|
3
|
|
|
|
|
421
|
|
21
|
|
|
|
|
|
|
|
22
|
3
|
|
|
3
|
|
26
|
use strict; |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
107
|
|
23
|
3
|
|
|
3
|
|
22
|
use warnings; |
|
3
|
|
|
|
|
12
|
|
|
3
|
|
|
|
|
102
|
|
24
|
3
|
|
|
3
|
|
23
|
use utf8; |
|
3
|
|
|
|
|
10
|
|
|
3
|
|
|
|
|
27
|
|
25
|
|
|
|
|
|
|
our $VERSION = 1.20230903131447; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
my $formatters = [ |
28
|
|
|
|
|
|
|
{ |
29
|
|
|
|
|
|
|
'format' => '$1', |
30
|
|
|
|
|
|
|
'intl_format' => 'NA', |
31
|
|
|
|
|
|
|
'leading_digits' => '10', |
32
|
|
|
|
|
|
|
'pattern' => '(\\d{4})' |
33
|
|
|
|
|
|
|
}, |
34
|
|
|
|
|
|
|
{ |
35
|
|
|
|
|
|
|
'format' => '$1 $2', |
36
|
|
|
|
|
|
|
'intl_format' => 'NA', |
37
|
|
|
|
|
|
|
'leading_digits' => '1', |
38
|
|
|
|
|
|
|
'pattern' => '(\\d{3})(\\d{3})' |
39
|
|
|
|
|
|
|
}, |
40
|
|
|
|
|
|
|
{ |
41
|
|
|
|
|
|
|
'format' => '$1 $2 $3 $4', |
42
|
|
|
|
|
|
|
'leading_digits' => '8', |
43
|
|
|
|
|
|
|
'national_rule' => '0 $1', |
44
|
|
|
|
|
|
|
'pattern' => '(\\d{3})(\\d{2})(\\d{2})(\\d{2})' |
45
|
|
|
|
|
|
|
}, |
46
|
|
|
|
|
|
|
{ |
47
|
|
|
|
|
|
|
'format' => '$1 $2 $3 $4 $5', |
48
|
|
|
|
|
|
|
'leading_digits' => '[1-79]', |
49
|
|
|
|
|
|
|
'national_rule' => '0$1', |
50
|
|
|
|
|
|
|
'pattern' => '(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})' |
51
|
|
|
|
|
|
|
} |
52
|
|
|
|
|
|
|
]; |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
my $validators = { |
55
|
|
|
|
|
|
|
'fixed_line' => ' |
56
|
|
|
|
|
|
|
59[1-9]\\d{6}| |
57
|
|
|
|
|
|
|
(?: |
58
|
|
|
|
|
|
|
[1-3]\\d| |
59
|
|
|
|
|
|
|
4[1-9]| |
60
|
|
|
|
|
|
|
5[0-8] |
61
|
|
|
|
|
|
|
)\\d{7} |
62
|
|
|
|
|
|
|
', |
63
|
|
|
|
|
|
|
'geographic' => ' |
64
|
|
|
|
|
|
|
59[1-9]\\d{6}| |
65
|
|
|
|
|
|
|
(?: |
66
|
|
|
|
|
|
|
[1-3]\\d| |
67
|
|
|
|
|
|
|
4[1-9]| |
68
|
|
|
|
|
|
|
5[0-8] |
69
|
|
|
|
|
|
|
)\\d{7} |
70
|
|
|
|
|
|
|
', |
71
|
|
|
|
|
|
|
'mobile' => ' |
72
|
|
|
|
|
|
|
(?: |
73
|
|
|
|
|
|
|
6(?: |
74
|
|
|
|
|
|
|
[0-24-8]\\d| |
75
|
|
|
|
|
|
|
3[0-8]| |
76
|
|
|
|
|
|
|
9[589] |
77
|
|
|
|
|
|
|
)| |
78
|
|
|
|
|
|
|
7[3-9]\\d |
79
|
|
|
|
|
|
|
)\\d{6} |
80
|
|
|
|
|
|
|
', |
81
|
|
|
|
|
|
|
'pager' => '', |
82
|
|
|
|
|
|
|
'personal_number' => '', |
83
|
|
|
|
|
|
|
'specialrate' => '( |
84
|
|
|
|
|
|
|
8(?: |
85
|
|
|
|
|
|
|
1[01]| |
86
|
|
|
|
|
|
|
2[0156]| |
87
|
|
|
|
|
|
|
4[02]| |
88
|
|
|
|
|
|
|
84 |
89
|
|
|
|
|
|
|
)\\d{6} |
90
|
|
|
|
|
|
|
)|( |
91
|
|
|
|
|
|
|
836(?: |
92
|
|
|
|
|
|
|
0[0-36-9]| |
93
|
|
|
|
|
|
|
[1-9]\\d |
94
|
|
|
|
|
|
|
)\\d{4}| |
95
|
|
|
|
|
|
|
8(?: |
96
|
|
|
|
|
|
|
1[2-9]| |
97
|
|
|
|
|
|
|
2[2-47-9]| |
98
|
|
|
|
|
|
|
3[0-57-9]| |
99
|
|
|
|
|
|
|
[569]\\d| |
100
|
|
|
|
|
|
|
8[0-35-9] |
101
|
|
|
|
|
|
|
)\\d{6} |
102
|
|
|
|
|
|
|
)|(80[6-9]\\d{6})', |
103
|
|
|
|
|
|
|
'toll_free' => '80[0-5]\\d{6}', |
104
|
|
|
|
|
|
|
'voip' => '9\\d{8}' |
105
|
|
|
|
|
|
|
}; |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
sub new { |
108
|
25
|
|
|
25
|
1
|
58
|
my $class = shift; |
109
|
25
|
|
|
|
|
54
|
my $number = shift; |
110
|
25
|
|
|
|
|
164
|
$number =~ s/(^\+33|\D)//g; |
111
|
25
|
|
|
|
|
162
|
my $self = bless({ country_code => '33', number => $number, formatters => $formatters, validators => $validators, }, $class); |
112
|
25
|
100
|
|
|
|
119
|
return $self if ($self->is_valid()); |
113
|
1
|
|
|
|
|
4
|
$number =~ s/^(?:0)//; |
114
|
1
|
|
|
|
|
13
|
$self = bless({ country_code => '33', number => $number, formatters => $formatters, validators => $validators, }, $class); |
115
|
1
|
50
|
|
|
|
5
|
return $self->is_valid() ? $self : undef; |
116
|
|
|
|
|
|
|
} |
117
|
|
|
|
|
|
|
1; |