line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Faker::Plugin::EnUs::TelephoneNumber; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
21095
|
use 5.018; |
|
2
|
|
|
|
|
11
|
|
4
|
|
|
|
|
|
|
|
5
|
2
|
|
|
2
|
|
14
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
44
|
|
6
|
2
|
|
|
2
|
|
11
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
70
|
|
7
|
|
|
|
|
|
|
|
8
|
2
|
|
|
2
|
|
14
|
use Venus::Class 'base'; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
14
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
base 'Faker::Plugin::EnUs'; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
# VERSION |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
our $VERSION = '1.17'; |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
# METHODS |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub execute { |
19
|
6
|
|
|
6
|
1
|
1139
|
my ($self, $data) = @_; |
20
|
|
|
|
|
|
|
|
21
|
6
|
|
|
|
|
34
|
return $self->process_markers( |
22
|
|
|
|
|
|
|
$self->faker->random->select(format_for_telephone_number()), |
23
|
|
|
|
|
|
|
'numbers', |
24
|
|
|
|
|
|
|
); |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub format_for_telephone_number { |
28
|
6
|
|
|
6
|
0
|
36
|
state $telephone_number = [ |
29
|
|
|
|
|
|
|
'###-###-####', |
30
|
|
|
|
|
|
|
'###-###-####', |
31
|
|
|
|
|
|
|
'### ### ####', |
32
|
|
|
|
|
|
|
'### ### ####', |
33
|
|
|
|
|
|
|
'### ### ####', |
34
|
|
|
|
|
|
|
'### ### ####', |
35
|
|
|
|
|
|
|
'(###) ###-####', |
36
|
|
|
|
|
|
|
'(###) ###-####', |
37
|
|
|
|
|
|
|
'(###) ###-####', |
38
|
|
|
|
|
|
|
'(###) ###-####', |
39
|
|
|
|
|
|
|
'+##(#)##########', |
40
|
|
|
|
|
|
|
'+##(#)##########', |
41
|
|
|
|
|
|
|
'0##########', |
42
|
|
|
|
|
|
|
'0##########', |
43
|
|
|
|
|
|
|
'###-###-####', |
44
|
|
|
|
|
|
|
'(###) ### ####', |
45
|
|
|
|
|
|
|
'1-###-###-####', |
46
|
|
|
|
|
|
|
'###.###.####', |
47
|
|
|
|
|
|
|
'###-###-####', |
48
|
|
|
|
|
|
|
'### ### ####', |
49
|
|
|
|
|
|
|
'##########', |
50
|
|
|
|
|
|
|
'(###) ###-####', |
51
|
|
|
|
|
|
|
'1-###-###-####', |
52
|
|
|
|
|
|
|
'###.###.####', |
53
|
|
|
|
|
|
|
'###-###-####x###', |
54
|
|
|
|
|
|
|
'(###)###-####x###', |
55
|
|
|
|
|
|
|
'1-###-###-####x###', |
56
|
|
|
|
|
|
|
'###.###.####x###', |
57
|
|
|
|
|
|
|
'###-###-#### x####', |
58
|
|
|
|
|
|
|
'(###)###-####x####', |
59
|
|
|
|
|
|
|
'1-###-###-####x####', |
60
|
|
|
|
|
|
|
'###.###.####x####', |
61
|
|
|
|
|
|
|
'###-###-####x#####', |
62
|
|
|
|
|
|
|
'(###)###-####x#####', |
63
|
|
|
|
|
|
|
'1-###-###-####x#####', |
64
|
|
|
|
|
|
|
'###.###.#### x#####', |
65
|
|
|
|
|
|
|
] |
66
|
|
|
|
|
|
|
} |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
1; |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=head1 NAME |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
Faker::Plugin::EnUs::TelephoneNumber - Telephone Number |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=cut |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=head1 ABSTRACT |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
Telephone Number for Faker |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=cut |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=head1 VERSION |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
1.17 |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=cut |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
=head1 SYNOPSIS |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
package main; |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
use Faker::Plugin::EnUs::TelephoneNumber; |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
my $plugin = Faker::Plugin::EnUs::TelephoneNumber->new; |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
# bless(..., "Faker::Plugin::EnUs::TelephoneNumber") |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
=cut |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
=head1 DESCRIPTION |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
This package provides methods for generating fake data for telephone number. |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
=encoding utf8 |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
=cut |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
=head1 INHERITS |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
This package inherits behaviors from: |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
L |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
=cut |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
=head1 METHODS |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
This package provides the following methods: |
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
=cut |
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
=head2 execute |
125
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
execute(HashRef $data) (Str) |
127
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
The execute method returns a returns a random fake telephone number. |
129
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
I> |
131
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
=over 4 |
133
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
=item execute example 1 |
135
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
package main; |
137
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
use Faker::Plugin::EnUs::TelephoneNumber; |
139
|
|
|
|
|
|
|
|
140
|
|
|
|
|
|
|
my $plugin = Faker::Plugin::EnUs::TelephoneNumber->new; |
141
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
# bless(..., "Faker::Plugin::EnUs::TelephoneNumber") |
143
|
|
|
|
|
|
|
|
144
|
|
|
|
|
|
|
# my $result = $plugin->execute; |
145
|
|
|
|
|
|
|
|
146
|
|
|
|
|
|
|
# "01408446845"; |
147
|
|
|
|
|
|
|
|
148
|
|
|
|
|
|
|
# my $result = $plugin->execute; |
149
|
|
|
|
|
|
|
|
150
|
|
|
|
|
|
|
# "769-454-4390"; |
151
|
|
|
|
|
|
|
|
152
|
|
|
|
|
|
|
# my $result = $plugin->execute; |
153
|
|
|
|
|
|
|
|
154
|
|
|
|
|
|
|
# "1-822-037-0225x82882"; |
155
|
|
|
|
|
|
|
|
156
|
|
|
|
|
|
|
=back |
157
|
|
|
|
|
|
|
|
158
|
|
|
|
|
|
|
=cut |
159
|
|
|
|
|
|
|
|
160
|
|
|
|
|
|
|
=head2 new |
161
|
|
|
|
|
|
|
|
162
|
|
|
|
|
|
|
new(HashRef $data) (Plugin) |
163
|
|
|
|
|
|
|
|
164
|
|
|
|
|
|
|
The new method returns a new instance of the class. |
165
|
|
|
|
|
|
|
|
166
|
|
|
|
|
|
|
I> |
167
|
|
|
|
|
|
|
|
168
|
|
|
|
|
|
|
=over 4 |
169
|
|
|
|
|
|
|
|
170
|
|
|
|
|
|
|
=item new example 1 |
171
|
|
|
|
|
|
|
|
172
|
|
|
|
|
|
|
package main; |
173
|
|
|
|
|
|
|
|
174
|
|
|
|
|
|
|
use Faker::Plugin::EnUs::TelephoneNumber; |
175
|
|
|
|
|
|
|
|
176
|
|
|
|
|
|
|
my $plugin = Faker::Plugin::EnUs::TelephoneNumber->new; |
177
|
|
|
|
|
|
|
|
178
|
|
|
|
|
|
|
# bless(..., "Faker::Plugin::EnUs::TelephoneNumber") |
179
|
|
|
|
|
|
|
|
180
|
|
|
|
|
|
|
=back |
181
|
|
|
|
|
|
|
|
182
|
|
|
|
|
|
|
=cut |