File Coverage

blib/lib/Faker/Plugin/EsEs/AddressNumber.pm
Criterion Covered Total %
statement 14 14 100.0
branch n/a
condition n/a
subroutine 6 6 100.0
pod 1 2 50.0
total 21 22 95.4


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