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