Faker/Plugin/EsEs/AddressStateName.pm

filter: Statementstmt 100% 17 / 17 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod 50.0% 1 / 2 totaltotal 96.0% 24 / 25 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Faker/Plugin/EsEs/AddressNumber.pm ↑ Summary Faker/Plugin/EsEs/AddressStreetAddress.pm »
1 package Faker::Plugin::EsEs::AddressStateName;
2  
3 2 ▶use 5.018;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 2 ▶use Venus::Class 'base';
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 2 base 'Faker::Plugin::EsEs';
11  
12 # VERSION
13  
14 2 our $VERSION = '1.19';
15  
16 # METHODS
17  
18 6 ▶sub execute {
Subroutine execute: called CC=1 SCAR=0.0
Pod documented
19 6 my ($self, $data) = @_;
20  
21 6 return $self->faker->random->select(data_for_address_state_name());
22 }
23  
24 6 ▶sub data_for_address_state_name {
Subroutine data_for_address_state_name: called CC=1 SCAR=0.0
Pod undocumented
25 6 state $address_state_name = [
26 'A Coruña',
27 'Álava',
28 'Albacete',
29 'Alicante',
30 'Almería',
31 'Asturias',
32 'Ávila',
33 'Badajoz',
34 'Barcelona',
35 'Burgos',
36 'Cáceres',
37 'Cádiz',
38 'Cantabria',
39 'Castellón',
40 'Ceuta',
41 'Ciudad Real',
42 'Cuenca',
43 'Córdoba',
44 'Girona',
45 'Granada',
46 'Guadalajara',
47 'Guipuzkoa',
48 'Huelva',
49 'Huesca',
50 'Illes Balears',
51 'Jaén',
52 'La Rioja',
53 'Las Palmas',
54 'León',
55 'Lleida',
56 'Lugo',
57 'Málaga',
58 'Madrid',
59 'Melilla',
60 'Murcia',
61 'Navarra',
62 'Ourense',
63 'Palencia',
64 'Pontevedra',
65 'Salamanca',
66 'Segovia',
67 'Sevilla',
68 'Soria',
69 'Santa Cruz de Tenerife',
70 'Tarragona',
71 'Teruel',
72 'Toledo',
73 'Valencia',
74 'Valladolid',
75 'Vizcaya',
76 'Zamora',
77 'Zaragoza',
78 ]
79 }
80  
81 2 1;
82  
83  
84  
85 =head1 NAME
86  
87 Faker::Plugin::EsEs::AddressStateName - Address State Name
88  
89 =cut
90  
91 =head1 ABSTRACT
92  
93 Address State Name for Faker
94  
95 =cut
96  
97 =head1 VERSION
98  
99 1.19
100  
101 =cut
102  
103 =head1 SYNOPSIS
104  
105 package main;
106  
107 use Faker::Plugin::EsEs::AddressStateName;
108  
109 my $plugin = Faker::Plugin::EsEs::AddressStateName->new;
110  
111 # bless(..., "Faker::Plugin::EsEs::AddressStateName")
112  
113 =cut
114  
115 =head1 DESCRIPTION
116  
117 This package provides methods for generating fake data for address state name.
118  
119 =encoding utf8
120  
121 =cut
122  
123 =head1 INHERITS
124  
125 This package inherits behaviors from:
126  
127 L<Faker::Plugin::EsEs>
128  
129 =cut
130  
131 =head1 METHODS
132  
133 This package provides the following methods:
134  
135 =cut
136  
137 =head2 execute
138  
139 execute(HashRef $data) (Str)
140  
141 The execute method returns a returns a random fake address state name.
142  
143 I<Since C<1.10>>
144  
145 =over 4
146  
147 =item execute example 1
148  
149 package main;
150  
151 use Faker::Plugin::EsEs::AddressStateName;
152  
153 my $plugin = Faker::Plugin::EsEs::AddressStateName->new;
154  
155 # bless(..., "Faker::Plugin::EsEs::AddressStateName")
156  
157 # my $result = $plugin->execute;
158  
159 # 'Córdoba';
160  
161 # my $result = $plugin->execute;
162  
163 # 'Guipuzkoa';
164  
165 # my $result = $plugin->execute;
166  
167 # 'Tarragona';
168  
169 =back
170  
171 =cut
172  
173 =head2 new
174  
175 new(HashRef $data) (Plugin)
176  
177 The new method returns a new instance of the class.
178  
179 I<Since C<1.10>>
180  
181 =over 4
182  
183 =item new example 1
184  
185 package main;
186  
187 use Faker::Plugin::EsEs::AddressStateName;
188  
189 my $plugin = Faker::Plugin::EsEs::AddressStateName->new;
190  
191 # bless(..., "Faker::Plugin::EsEs::AddressStateName")
192  
193 =back
194  
195 =cut
196  
197 =head1 AUTHORS
198  
199 Awncorp, C<awncorp@cpan.org>
200  
201 =cut
202  
203 =head1 LICENSE
204  
205 Copyright (C) 2000, Al Newkirk.
206  
207 This program is free software, you can redistribute it and/or modify it under
208 the terms of the Apache license version 2.0.
209  
210 =cut
« Faker/Plugin/EsEs/AddressNumber.pm ↑ Summary Faker/Plugin/EsEs/AddressStreetAddress.pm »