Faker/Plugin/EsEs/PersonFirstName.pm

filter: Statementstmt 100% 18 / 18 Branchbran 100% 2 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 7 / 7 Podpod 33.3% 1 / 3 totaltotal 93.3% 28 / 30 CC 2 SCAR 2.2
CC
2
Cov
100%
execute
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.2
« Faker/Plugin/EnUs/PersonNameSuffix.pm ↑ Summary Faker/Plugin/EsEs/PersonNamePrefix.pm »
1 package Faker::Plugin::EsEs::PersonFirstName;
2  
3 9 ▶use 5.018;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 9 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 9 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 9 ▶use Venus::Class 'base';
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 9 base 'Faker::Plugin::EsEs';
11  
12 # VERSION
13  
14 9 our $VERSION = '1.19';
15  
16 # METHODS
17  
18 21 ▶sub execute {
Subroutine execute: called CC=2 SCAR=6.9
Pod documented
19 21 my ($self, $data) = @_;
20  
21 21 ▶ return (lc($self->faker->person_gender) eq 'male')
Branch: 1 branch
BranchTrueFalseTotal
lc $self->faker->person_gender eq 'male' ? : 11 10 21
22 ? $self->faker->random->select(data_for_first_name_male())
23 : $self->faker->random->select(data_for_first_name_female());
24 }
25  
26 11 ▶sub data_for_first_name_male {
Subroutine data_for_first_name_male: called CC=1 SCAR=0.0
Pod undocumented
27 11 state $first_name = [
28 'Aaron',
29 'Adam',
30 'Adrián',
31 'Aitor',
32 'Alberto',
33 'Aleix',
34 'Alejandro',
35 'Alex',
36 'Alonso',
37 'Álvaro',
38 'Ander',
39 'Andrés',
40 'Ángel',
41 'Antonio',
42 'Arnau',
43 'Asier',
44 'Biel',
45 'Bruno',
46 'Carlos',
47 'César',
48 'Cristian',
49 'Daniel',
50 'Dario',
51 'David',
52 'Diego',
53 'Eduardo',
54 'Enrique',
55 'Eric',
56 'Erik',
57 'Fernando',
58 'Francisco',
59 'Francisco Javier',
60 'Gabriel',
61 'Gael',
62 'Gerard',
63 'Gonzalo',
64 'Guillem',
65 'Guillermo',
66 'Héctor',
67 'Hugo',
68 'Ian',
69 'Ignacio',
70 'Iker',
71 'Isaac',
72 'Ismael',
73 'Iván',
74 'Izan',
75 'Jaime',
76 'Jan',
77 'Javier',
78 'Jesús',
79 'Joel',
80 'Jon',
81 'Jordi',
82 'Jorge',
83 'José',
84 'José Antonio',
85 'José Manuel',
86 'Juan',
87 'Juan José',
88 'Leo',
89 'Lucas',
90 'Luis',
91 'Manuel',
92 'Marc',
93 'Marco',
94 'Marcos',
95 'Mario',
96 'Martín',
97 'Mateo',
98 'Miguel',
99 'Miguel Ángel',
100 'Nicolás',
101 'Oliver',
102 'Omar',
103 'Oriol',
104 'Óscar',
105 'Pablo',
106 'Pedro',
107 'Pol',
108 'Rafael',
109 'Raúl',
110 'Rayan',
111 'Roberto',
112 'Rodrigo',
113 'Rubén',
114 'Samuel',
115 'Santiago',
116 'Saúl',
117 'Sergio',
118 'Unai',
119 'Víctor',
120 'Yago',
121 'Yeray',
122 ]
123 }
124  
125 10 ▶sub data_for_first_name_female {
Subroutine data_for_first_name_female: called CC=1 SCAR=0.0
Pod undocumented
126 10 state $first_name = [
127 'Abril',
128 'Adriana',
129 'África',
130 'Aina',
131 'Ainara',
132 'Ainhoa',
133 'Aitana',
134 'Alba',
135 'Alejandra',
136 'Alexandra',
137 'Alexia',
138 'Alicia',
139 'Alma',
140 'Amparo',
141 'Ana',
142 'Ana Isabel',
143 'Ana María',
144 'Andrea',
145 'Ángela',
146 'Ángeles',
147 'Antonia',
148 'Ariadna',
149 'Aurora',
150 'Beatriz',
151 'Berta',
152 'Blanca',
153 'Candela',
154 'Carla',
155 'Carlota',
156 'Carmen',
157 'Carolina',
158 'Celia',
159 'Clara',
160 'Claudia',
161 'Cristina',
162 'Daniela',
163 'Diana',
164 'Elena',
165 'Elsa',
166 'Emilia',
167 'Encarnación',
168 'Eva',
169 'Esther',
170 'Fátima',
171 'Francisca',
172 'Gabriela',
173 'Gloria',
174 'Helena',
175 'Inés',
176 'Inmaculada',
177 'Irene',
178 'Isabel',
179 'Josefa',
180 'Jimena',
181 'Juana',
182 'Julia',
183 'Laia',
184 'Lara',
185 'Laura',
186 'Leire',
187 'Lorena',
188 'Lidia',
189 'Lola',
190 'Lucía',
191 'Luisa',
192 'Luna',
193 'Malak',
194 'Manuela',
195 'Mar',
196 'Mara',
197 'Margarita',
198 'María',
199 'María Ángeles',
200 'María Carmen',
201 'María Dolores',
202 'María Pilar',
203 'Marina',
204 'Marta',
205 'Martina',
206 'Mireia',
207 'Miriam',
208 'Nadia',
209 'Nahia',
210 'Naia',
211 'Naiara',
212 'Natalia',
213 'Nayara',
214 'Nerea',
215 'Nil',
216 'Noa',
217 'Noelia',
218 'Nora',
219 'Nuria',
220 'Olivia',
221 'Olga',
222 'Ona',
223 'Paola',
224 'Patricia',
225 'Pau',
226 'Paula',
227 'Pilar',
228 'Raquel',
229 'Rocío',
230 'Rosa',
231 'Rosa María',
232 'Rosario',
233 'Salma',
234 'Sandra',
235 'Sara',
236 'Silvia',
237 'Sofía',
238 'Sonia',
239 'Teresa',
240 'Úrsula',
241 'Valentina',
242 'Valeria',
243 'Vega',
244 'Vera',
245 'Verónica',
246 'Victoria',
247 'Yaiza',
248 'Yolanda',
249 'Zoe',
250 ]
251 }
252  
253 9 1;
254  
255  
256  
257 =head1 NAME
258  
259 Faker::Plugin::EsEs::PersonFirstName - Person First Name
260  
261 =cut
262  
263 =head1 ABSTRACT
264  
265 Person First Name for Faker
266  
267 =cut
268  
269 =head1 VERSION
270  
271 1.19
272  
273 =cut
274  
275 =head1 SYNOPSIS
276  
277 package main;
278  
279 use Faker::Plugin::EsEs::PersonFirstName;
280  
281 my $plugin = Faker::Plugin::EsEs::PersonFirstName->new;
282  
283 # bless(..., "Faker::Plugin::EsEs::PersonFirstName")
284  
285 =cut
286  
287 =head1 DESCRIPTION
288  
289 This package provides methods for generating fake data for person first name.
290  
291 =encoding utf8
292  
293 =cut
294  
295 =head1 INHERITS
296  
297 This package inherits behaviors from:
298  
299 L<Faker::Plugin::EsEs>
300  
301 =cut
302  
303 =head1 METHODS
304  
305 This package provides the following methods:
306  
307 =cut
308  
309 =head2 execute
310  
311 execute(HashRef $data) (Str)
312  
313 The execute method returns a returns a random fake person first name.
314  
315 I<Since C<1.10>>
316  
317 =over 4
318  
319 =item execute example 1
320  
321 package main;
322  
323 use Faker::Plugin::EsEs::PersonFirstName;
324  
325 my $plugin = Faker::Plugin::EsEs::PersonFirstName->new;
326  
327 # bless(..., "Faker::Plugin::EsEs::PersonFirstName")
328  
329 # my $result = $plugin->execute;
330  
331 # 'Hugo';
332  
333 # my $result = $plugin->execute;
334  
335 # 'Iván';
336  
337 # my $result = $plugin->execute;
338  
339 # 'Jorge';
340  
341 =back
342  
343 =cut
344  
345 =head2 new
346  
347 new(HashRef $data) (Plugin)
348  
349 The new method returns a new instance of the class.
350  
351 I<Since C<1.10>>
352  
353 =over 4
354  
355 =item new example 1
356  
357 package main;
358  
359 use Faker::Plugin::EsEs::PersonFirstName;
360  
361 my $plugin = Faker::Plugin::EsEs::PersonFirstName->new;
362  
363 # bless(..., "Faker::Plugin::EsEs::PersonFirstName")
364  
365 =back
366  
367 =cut
368  
369 =head1 AUTHORS
370  
371 Awncorp, C<awncorp@cpan.org>
372  
373 =cut
374  
375 =head1 LICENSE
376  
377 Copyright (C) 2000, Al Newkirk.
378  
379 This program is free software, you can redistribute it and/or modify it under
380 the terms of the Apache license version 2.0.
381  
382 =cut
« Faker/Plugin/EnUs/PersonNameSuffix.pm ↑ Summary Faker/Plugin/EsEs/PersonNamePrefix.pm »