line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Faker::Plugin::EsEs::TelephoneNumber; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
20124
|
use 5.018; |
|
1
|
|
|
|
|
4
|
|
4
|
|
|
|
|
|
|
|
5
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
19
|
|
6
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
24
|
|
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
5
|
use Venus::Class 'base'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
6
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
base 'Faker::Plugin::EsEs'; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
# VERSION |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
our $VERSION = '1.18'; |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
# METHODS |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub execute { |
19
|
3
|
|
|
3
|
1
|
1308
|
my ($self, $data) = @_; |
20
|
|
|
|
|
|
|
|
21
|
3
|
|
|
|
|
11
|
my $method = $self->faker->random->select( |
22
|
|
|
|
|
|
|
[ |
23
|
|
|
|
|
|
|
'data_for_telephone_number', |
24
|
|
|
|
|
|
|
'data_for_telephone_number_mobile', |
25
|
|
|
|
|
|
|
'data_for_telephone_number_tollfree' |
26
|
|
|
|
|
|
|
] |
27
|
|
|
|
|
|
|
); |
28
|
|
|
|
|
|
|
|
29
|
3
|
|
|
|
|
86
|
return $self->process_markers( |
30
|
|
|
|
|
|
|
$self->faker->random->select($self->$method), |
31
|
|
|
|
|
|
|
'numbers' |
32
|
|
|
|
|
|
|
); |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
sub data_for_telephone_number { |
36
|
1
|
|
|
1
|
0
|
8
|
state $telephone_number = [ |
37
|
|
|
|
|
|
|
'+34 9## ## ####', |
38
|
|
|
|
|
|
|
'+34 9## ######', |
39
|
|
|
|
|
|
|
'+34 9########', |
40
|
|
|
|
|
|
|
'+34 9##-##-####', |
41
|
|
|
|
|
|
|
'+34 9##-######', |
42
|
|
|
|
|
|
|
'9## ## ####', |
43
|
|
|
|
|
|
|
'9## ######', |
44
|
|
|
|
|
|
|
'9########', |
45
|
|
|
|
|
|
|
'9##-##-####', |
46
|
|
|
|
|
|
|
'9##-######', |
47
|
|
|
|
|
|
|
] |
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
sub data_for_telephone_number_mobile { |
51
|
2
|
|
|
2
|
0
|
10
|
state $telephone_number = [ |
52
|
|
|
|
|
|
|
'+34 6## ## ####', |
53
|
|
|
|
|
|
|
'+34 6## ######', |
54
|
|
|
|
|
|
|
'+34 6########', |
55
|
|
|
|
|
|
|
'+34 6##-##-####', |
56
|
|
|
|
|
|
|
'+34 6##-######', |
57
|
|
|
|
|
|
|
'6## ## ####', |
58
|
|
|
|
|
|
|
'6## ######', |
59
|
|
|
|
|
|
|
'6########', |
60
|
|
|
|
|
|
|
'6##-##-####', |
61
|
|
|
|
|
|
|
'6##-######', |
62
|
|
|
|
|
|
|
] |
63
|
|
|
|
|
|
|
} |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
sub data_for_telephone_number_tollfree { |
66
|
0
|
|
|
0
|
0
|
|
state $telephone_number = [ |
67
|
|
|
|
|
|
|
'900 ### ###', |
68
|
|
|
|
|
|
|
'800 ### ###', |
69
|
|
|
|
|
|
|
] |
70
|
|
|
|
|
|
|
} |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
1; |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=head1 NAME |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
Faker::Plugin::EsEs::TelephoneNumber - Telephone Number |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=cut |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=head1 ABSTRACT |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
Telephone Number for Faker |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
=cut |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=head1 VERSION |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
1.18 |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=cut |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
=head1 SYNOPSIS |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
package main; |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
use Faker::Plugin::EsEs::TelephoneNumber; |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
my $plugin = Faker::Plugin::EsEs::TelephoneNumber->new; |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
# bless(..., "Faker::Plugin::EsEs::TelephoneNumber") |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
=cut |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
=head1 DESCRIPTION |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
This package provides methods for generating fake data for telephone number. |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
=encoding utf8 |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
=cut |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
=head1 INHERITS |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
This package inherits behaviors from: |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
L |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
=cut |
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
=head1 METHODS |
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
This package provides the following methods: |
125
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
=cut |
127
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
=head2 execute |
129
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
execute(HashRef $data) (Str) |
131
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
The execute method returns a returns a random fake telephone number. |
133
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
I> |
135
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
=over 4 |
137
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
=item execute example 1 |
139
|
|
|
|
|
|
|
|
140
|
|
|
|
|
|
|
package main; |
141
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
use Faker::Plugin::EsEs::TelephoneNumber; |
143
|
|
|
|
|
|
|
|
144
|
|
|
|
|
|
|
my $plugin = Faker::Plugin::EsEs::TelephoneNumber->new; |
145
|
|
|
|
|
|
|
|
146
|
|
|
|
|
|
|
# bless(..., "Faker::Plugin::EsEs::TelephoneNumber") |
147
|
|
|
|
|
|
|
|
148
|
|
|
|
|
|
|
# my $result = $plugin->execute; |
149
|
|
|
|
|
|
|
|
150
|
|
|
|
|
|
|
# '+34 640 844684'; |
151
|
|
|
|
|
|
|
|
152
|
|
|
|
|
|
|
# my $result = $plugin->execute; |
153
|
|
|
|
|
|
|
|
154
|
|
|
|
|
|
|
# '+34 676 94 5443'; |
155
|
|
|
|
|
|
|
|
156
|
|
|
|
|
|
|
# my $result = $plugin->execute; |
157
|
|
|
|
|
|
|
|
158
|
|
|
|
|
|
|
# '998-22-0370'; |
159
|
|
|
|
|
|
|
|
160
|
|
|
|
|
|
|
=back |
161
|
|
|
|
|
|
|
|
162
|
|
|
|
|
|
|
=cut |
163
|
|
|
|
|
|
|
|
164
|
|
|
|
|
|
|
=head2 new |
165
|
|
|
|
|
|
|
|
166
|
|
|
|
|
|
|
new(HashRef $data) (Plugin) |
167
|
|
|
|
|
|
|
|
168
|
|
|
|
|
|
|
The new method returns a new instance of the class. |
169
|
|
|
|
|
|
|
|
170
|
|
|
|
|
|
|
I> |
171
|
|
|
|
|
|
|
|
172
|
|
|
|
|
|
|
=over 4 |
173
|
|
|
|
|
|
|
|
174
|
|
|
|
|
|
|
=item new example 1 |
175
|
|
|
|
|
|
|
|
176
|
|
|
|
|
|
|
package main; |
177
|
|
|
|
|
|
|
|
178
|
|
|
|
|
|
|
use Faker::Plugin::EsEs::TelephoneNumber; |
179
|
|
|
|
|
|
|
|
180
|
|
|
|
|
|
|
my $plugin = Faker::Plugin::EsEs::TelephoneNumber->new; |
181
|
|
|
|
|
|
|
|
182
|
|
|
|
|
|
|
# bless(..., "Faker::Plugin::EsEs::TelephoneNumber") |
183
|
|
|
|
|
|
|
|
184
|
|
|
|
|
|
|
=back |
185
|
|
|
|
|
|
|
|
186
|
|
|
|
|
|
|
=cut |
187
|
|
|
|
|
|
|
|
188
|
|
|
|
|
|
|
=head1 AUTHORS |
189
|
|
|
|
|
|
|
|
190
|
|
|
|
|
|
|
Awncorp, C |
191
|
|
|
|
|
|
|
|
192
|
|
|
|
|
|
|
=cut |
193
|
|
|
|
|
|
|
|
194
|
|
|
|
|
|
|
=head1 LICENSE |
195
|
|
|
|
|
|
|
|
196
|
|
|
|
|
|
|
Copyright (C) 2000, Al Newkirk. |
197
|
|
|
|
|
|
|
|
198
|
|
|
|
|
|
|
This program is free software, you can redistribute it and/or modify it under |
199
|
|
|
|
|
|
|
the terms of the Apache license version 2.0. |
200
|
|
|
|
|
|
|
|
201
|
|
|
|
|
|
|
=cut |