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::NF; |
20
|
2
|
|
|
2
|
|
1188
|
use base qw(Number::Phone::StubCountry); |
|
2
|
|
|
|
|
16
|
|
|
2
|
|
|
|
|
235
|
|
21
|
|
|
|
|
|
|
|
22
|
2
|
|
|
2
|
|
20
|
use strict; |
|
2
|
|
|
|
|
9
|
|
|
2
|
|
|
|
|
53
|
|
23
|
2
|
|
|
2
|
|
12
|
use warnings; |
|
2
|
|
|
|
|
8
|
|
|
2
|
|
|
|
|
57
|
|
24
|
2
|
|
|
2
|
|
11
|
use utf8; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
16
|
|
25
|
|
|
|
|
|
|
our $VERSION = 1.20230903131448; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
my $formatters = [ |
28
|
|
|
|
|
|
|
{ |
29
|
|
|
|
|
|
|
'format' => '$1 $2', |
30
|
|
|
|
|
|
|
'leading_digits' => '1[0-3]', |
31
|
|
|
|
|
|
|
'pattern' => '(\\d{2})(\\d{4})' |
32
|
|
|
|
|
|
|
}, |
33
|
|
|
|
|
|
|
{ |
34
|
|
|
|
|
|
|
'format' => '$1 $2', |
35
|
|
|
|
|
|
|
'leading_digits' => '[13]', |
36
|
|
|
|
|
|
|
'pattern' => '(\\d)(\\d{5})' |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
]; |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
my $validators = { |
41
|
|
|
|
|
|
|
'fixed_line' => ' |
42
|
|
|
|
|
|
|
(?: |
43
|
|
|
|
|
|
|
1(?: |
44
|
|
|
|
|
|
|
06| |
45
|
|
|
|
|
|
|
17| |
46
|
|
|
|
|
|
|
28| |
47
|
|
|
|
|
|
|
39 |
48
|
|
|
|
|
|
|
)| |
49
|
|
|
|
|
|
|
3[0-2]\\d |
50
|
|
|
|
|
|
|
)\\d{3} |
51
|
|
|
|
|
|
|
', |
52
|
|
|
|
|
|
|
'geographic' => ' |
53
|
|
|
|
|
|
|
(?: |
54
|
|
|
|
|
|
|
1(?: |
55
|
|
|
|
|
|
|
06| |
56
|
|
|
|
|
|
|
17| |
57
|
|
|
|
|
|
|
28| |
58
|
|
|
|
|
|
|
39 |
59
|
|
|
|
|
|
|
)| |
60
|
|
|
|
|
|
|
3[0-2]\\d |
61
|
|
|
|
|
|
|
)\\d{3} |
62
|
|
|
|
|
|
|
', |
63
|
|
|
|
|
|
|
'mobile' => ' |
64
|
|
|
|
|
|
|
(?: |
65
|
|
|
|
|
|
|
14| |
66
|
|
|
|
|
|
|
3[58] |
67
|
|
|
|
|
|
|
)\\d{4} |
68
|
|
|
|
|
|
|
', |
69
|
|
|
|
|
|
|
'pager' => '', |
70
|
|
|
|
|
|
|
'personal_number' => '', |
71
|
|
|
|
|
|
|
'specialrate' => '', |
72
|
|
|
|
|
|
|
'toll_free' => '', |
73
|
|
|
|
|
|
|
'voip' => '' |
74
|
|
|
|
|
|
|
}; |
75
|
|
|
|
|
|
|
my %areanames = (); |
76
|
|
|
|
|
|
|
$areanames{en} = {"67210", "Davis", |
77
|
|
|
|
|
|
|
"67212", "Casey", |
78
|
|
|
|
|
|
|
"67213", "Macquarie\ Island", |
79
|
|
|
|
|
|
|
"67211", "Mawson",}; |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
sub new { |
82
|
6
|
|
|
6
|
1
|
18
|
my $class = shift; |
83
|
6
|
|
|
|
|
16
|
my $number = shift; |
84
|
6
|
|
|
|
|
38
|
$number =~ s/(^\+672|\D)//g; |
85
|
6
|
|
|
|
|
48
|
my $self = bless({ country_code => '672', number => $number, formatters => $formatters, validators => $validators, areanames => \%areanames}, $class); |
86
|
6
|
100
|
|
|
|
45
|
return $self if ($self->is_valid()); |
87
|
3
|
|
|
|
|
24
|
my $prefix = qr/^(?:([0-258]\d{4})$)/; |
88
|
3
|
|
|
|
|
22
|
my @matches = $number =~ /$prefix/; |
89
|
3
|
50
|
|
|
|
14
|
if (defined $matches[-1]) { |
90
|
2
|
|
|
2
|
|
703
|
no warnings 'uninitialized'; |
|
2
|
|
|
|
|
15
|
|
|
2
|
|
|
|
|
379
|
|
91
|
0
|
|
|
|
|
0
|
$number =~ s/$prefix/3$1/; |
92
|
|
|
|
|
|
|
} |
93
|
|
|
|
|
|
|
else { |
94
|
3
|
|
|
|
|
12
|
$number =~ s/$prefix//; |
95
|
|
|
|
|
|
|
} |
96
|
3
|
|
|
|
|
37
|
$self = bless({ country_code => '672', number => $number, formatters => $formatters, validators => $validators, areanames => \%areanames}, $class); |
97
|
3
|
50
|
|
|
|
13
|
return $self->is_valid() ? $self : undef; |
98
|
|
|
|
|
|
|
} |
99
|
|
|
|
|
|
|
1; |