| 1 | package Faker::Plugin::EnUs::AddressCityName; | ||
| 2 | |||
| 3 | 3 | ▶ | use 5.018; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | |||
| 5 | 3 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | 3 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | |||
| 8 | 3 | ▶ | use Venus::Class 'base'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | |||
| 10 | 3 | base 'Faker::Plugin::EnUs'; | |
| 11 | |||
| 12 | # VERSION | ||
| 13 | |||
| 14 | 3 | our $VERSION = '1.19'; | |
| 15 | |||
| 16 | # METHODS | ||
| 17 | |||
| 18 | 12 | ▶ | sub execute { |
|
Subroutine
execute: called CC=1 SCAR=0.0
Pod
documented
| |||
| 19 | 12 | my ($self, $data) = @_; | |
| 20 | |||
| 21 | 12 | return $self->process_format( | |
| 22 | $self->faker->random->select(data_for_address_city_name()), | ||
| 23 | ); | ||
| 24 | } | ||
| 25 | |||
| 26 | 12 | ▶ | sub data_for_address_city_name { |
|
Subroutine
data_for_address_city_name: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 27 | 12 | state $address_city_name = [ | |
| 28 | '{{address_city_prefix}} {{person_first_name}}{{address_city_suffix}}', | ||
| 29 | '{{address_city_prefix}} {{person_first_name}}', | ||
| 30 | '{{person_first_name}}{{address_city_suffix}}', | ||
| 31 | '{{person_last_name}}{{address_city_suffix}}', | ||
| 32 | ] | ||
| 33 | } | ||
| 34 | |||
| 35 | 3 | 1; | |
| 36 | |||
| 37 | |||
| 38 | |||
| 39 | =head1 NAME | ||
| 40 | |||
| 41 | Faker::Plugin::EnUs::AddressCityName - Address City Name | ||
| 42 | |||
| 43 | =cut | ||
| 44 | |||
| 45 | =head1 ABSTRACT | ||
| 46 | |||
| 47 | Address City Name for Faker | ||
| 48 | |||
| 49 | =cut | ||
| 50 | |||
| 51 | =head1 VERSION | ||
| 52 | |||
| 53 | 1.19 | ||
| 54 | |||
| 55 | =cut | ||
| 56 | |||
| 57 | =head1 SYNOPSIS | ||
| 58 | |||
| 59 | package main; | ||
| 60 | |||
| 61 | use Faker::Plugin::EnUs::AddressCityName; | ||
| 62 | |||
| 63 | my $plugin = Faker::Plugin::EnUs::AddressCityName->new; | ||
| 64 | |||
| 65 | # bless(..., "Faker::Plugin::EnUs::AddressCityName") | ||
| 66 | |||
| 67 | =cut | ||
| 68 | |||
| 69 | =head1 DESCRIPTION | ||
| 70 | |||
| 71 | This package provides methods for generating fake data for address city name. | ||
| 72 | |||
| 73 | =encoding utf8 | ||
| 74 | |||
| 75 | =cut | ||
| 76 | |||
| 77 | =head1 INHERITS | ||
| 78 | |||
| 79 | This package inherits behaviors from: | ||
| 80 | |||
| 81 | L<Faker::Plugin::EnUs> | ||
| 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 city name. | ||
| 96 | |||
| 97 | I<Since C<1.10>> | ||
| 98 | |||
| 99 | =over 4 | ||
| 100 | |||
| 101 | =item execute example 1 | ||
| 102 | |||
| 103 | package main; | ||
| 104 | |||
| 105 | use Faker::Plugin::EnUs::AddressCityName; | ||
| 106 | |||
| 107 | my $plugin = Faker::Plugin::EnUs::AddressCityName->new; | ||
| 108 | |||
| 109 | # bless(..., "Faker::Plugin::EnUs::AddressCityName") | ||
| 110 | |||
| 111 | # my $result = $plugin->execute; | ||
| 112 | |||
| 113 | # "West Jamison"; | ||
| 114 | |||
| 115 | # my $result = $plugin->execute; | ||
| 116 | |||
| 117 | # "Mayertown"; | ||
| 118 | |||
| 119 | # my $result = $plugin->execute; | ||
| 120 | |||
| 121 | # "Juliaborough"; | ||
| 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<Since C<1.10>> | ||
| 134 | |||
| 135 | =over 4 | ||
| 136 | |||
| 137 | =item new example 1 | ||
| 138 | |||
| 139 | package main; | ||
| 140 | |||
| 141 | use Faker::Plugin::EnUs::AddressCityName; | ||
| 142 | |||
| 143 | my $plugin = Faker::Plugin::EnUs::AddressCityName->new; | ||
| 144 | |||
| 145 | # bless(..., "Faker::Plugin::EnUs::AddressCityName") | ||
| 146 | |||
| 147 | =back | ||
| 148 | |||
| 149 | =cut | ||
| 150 | |||
| 151 | =head1 AUTHORS | ||
| 152 | |||
| 153 | Awncorp, C<awncorp@cpan.org> | ||
| 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 | ||