Faker/Plugin/EnUs/AddressLines.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/EnUs/AddressLine2.pm ↑ Summary Faker/Plugin/EnUs/AddressNumber.pm »
1 package Faker::Plugin::EnUs::AddressLines;
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::EnUs';
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->process_markers(
22 $self->process_format(
23 $self->faker->random->select(data_for_address_lines()),
24 ),
25 'newlines',
26 );
27 }
28  
29 6 ▶sub data_for_address_lines {
Subroutine data_for_address_lines: called CC=1 SCAR=0.0
Pod undocumented
30 6 state $address_lines = [
31 '{{address_street_address}}\n{{address_city_name}}, {{address_state_abbr}} {{address_postal_code}}',
32 '{{address_street_address}}\n{{address_city_name}}, {{address_state_name}} {{address_postal_code}}'
33 ]
34 }
35  
36 2 1;
37  
38  
39  
40 =head1 NAME
41  
42 Faker::Plugin::EnUs::AddressLines - Address Lines
43  
44 =cut
45  
46 =head1 ABSTRACT
47  
48 Address Lines for Faker
49  
50 =cut
51  
52 =head1 VERSION
53  
54 1.19
55  
56 =cut
57  
58 =head1 SYNOPSIS
59  
60 package main;
61  
62 use Faker::Plugin::EnUs::AddressLines;
63  
64 my $plugin = Faker::Plugin::EnUs::AddressLines->new;
65  
66 # bless(..., "Faker::Plugin::EnUs::AddressLines")
67  
68 =cut
69  
70 =head1 DESCRIPTION
71  
72 This package provides methods for generating fake data for address lines.
73  
74 =encoding utf8
75  
76 =cut
77  
78 =head1 INHERITS
79  
80 This package inherits behaviors from:
81  
82 L<Faker::Plugin::EnUs>
83  
84 =cut
85  
86 =head1 METHODS
87  
88 This package provides the following methods:
89  
90 =cut
91  
92 =head2 execute
93  
94 execute(HashRef $data) (Str)
95  
96 The execute method returns a returns a random fake address lines.
97  
98 I<Since C<1.10>>
99  
100 =over 4
101  
102 =item execute example 1
103  
104 package main;
105  
106 use Faker::Plugin::EnUs::AddressLines;
107  
108 my $plugin = Faker::Plugin::EnUs::AddressLines->new;
109  
110 # bless(..., "Faker::Plugin::EnUs::AddressLines")
111  
112 # my $result = $plugin->execute;
113  
114 # "4 Koelpin Plaza Unit 694\nWest Viviane, IA 37022";
115  
116 # my $result = $plugin->execute;
117  
118 # "90558 Greenholt Orchard\nApt. 250\nPfannerstillberg, New Mexico 52836";
119  
120 # my $result = $plugin->execute;
121  
122 # "68768 Weissnat Point\nRitchieburgh, New Mexico 53892";
123  
124 =back
125  
126 =cut
127  
128 =head2 new
129  
130 new(HashRef $data) (Plugin)
131  
132 The new method returns a new instance of the class.
133  
134 I<Since C<1.10>>
135  
136 =over 4
137  
138 =item new example 1
139  
140 package main;
141  
142 use Faker::Plugin::EnUs::AddressLines;
143  
144 my $plugin = Faker::Plugin::EnUs::AddressLines->new;
145  
146 # bless(..., "Faker::Plugin::EnUs::AddressLines")
147  
148 =back
149  
150 =cut
151  
152 =head1 AUTHORS
153  
154 Awncorp, C<awncorp@cpan.org>
155  
156 =cut
157  
158 =head1 LICENSE
159  
160 Copyright (C) 2000, Al Newkirk.
161  
162 This program is free software, you can redistribute it and/or modify it under
163 the terms of the Apache license version 2.0.
164  
165 =cut
« Faker/Plugin/EnUs/AddressLine2.pm ↑ Summary Faker/Plugin/EnUs/AddressNumber.pm »