| 1 | package Faker::Plugin::JaJp::AddressPrefecture; | ||
| 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::JaJp'; | |
| 11 | |||
| 12 | # VERSION | ||
| 13 | |||
| 14 | 3 | our $VERSION = '1.19'; | |
| 15 | |||
| 16 | # METHODS | ||
| 17 | |||
| 18 | 9 | ▶ | sub execute { |
|
Subroutine
execute: called CC=1 SCAR=0.0
Pod
documented
| |||
| 19 | 9 | my ($self, $data) = @_; | |
| 20 | |||
| 21 | 9 | return $self->faker->random->select(data_for_address_prefecture()); | |
| 22 | } | ||
| 23 | |||
| 24 | 9 | ▶ | sub data_for_address_prefecture { |
|
Subroutine
data_for_address_prefecture: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 25 | 9 | state $address_prefecture = [ | |
| 26 | '北海道', | ||
| 27 | '青森県', | ||
| 28 | '岩手県', | ||
| 29 | '宮城県', | ||
| 30 | '秋田県', | ||
| 31 | '山形県', | ||
| 32 | '福島県', | ||
| 33 | '茨城県', | ||
| 34 | '栃木県', | ||
| 35 | '群馬県', | ||
| 36 | '埼玉県', | ||
| 37 | '千葉県', | ||
| 38 | '東京都', | ||
| 39 | '神奈川県', | ||
| 40 | '新潟県', | ||
| 41 | '富山県', | ||
| 42 | '石川県', | ||
| 43 | '福井県', | ||
| 44 | '山梨県', | ||
| 45 | '長野県', | ||
| 46 | '岐阜県', | ||
| 47 | '静岡県', | ||
| 48 | '愛知県', | ||
| 49 | '三重県', | ||
| 50 | '滋賀県', | ||
| 51 | '京都府', | ||
| 52 | '大阪府', | ||
| 53 | '兵庫県', | ||
| 54 | '奈良県', | ||
| 55 | '和歌山県', | ||
| 56 | '鳥取県', | ||
| 57 | '島根県', | ||
| 58 | '岡山県', | ||
| 59 | '広島県', | ||
| 60 | '山口県', | ||
| 61 | '徳島県', | ||
| 62 | '香川県', | ||
| 63 | '愛媛県', | ||
| 64 | '高知県', | ||
| 65 | '福岡県', | ||
| 66 | '佐賀県', | ||
| 67 | '長崎県', | ||
| 68 | '熊本県', | ||
| 69 | '大分県', | ||
| 70 | '宮崎県', | ||
| 71 | '鹿児島県', | ||
| 72 | '沖縄県', | ||
| 73 | ] | ||
| 74 | } | ||
| 75 | |||
| 76 | 3 | 1; | |
| 77 | |||
| 78 | |||
| 79 | |||
| 80 | =head1 NAME | ||
| 81 | |||
| 82 | Faker::Plugin::JaJp::AddressPrefecture - Address Prefecture | ||
| 83 | |||
| 84 | =cut | ||
| 85 | |||
| 86 | =head1 ABSTRACT | ||
| 87 | |||
| 88 | Address Prefecture for Faker | ||
| 89 | |||
| 90 | =cut | ||
| 91 | |||
| 92 | =head1 VERSION | ||
| 93 | |||
| 94 | 1.19 | ||
| 95 | |||
| 96 | =cut | ||
| 97 | |||
| 98 | =head1 SYNOPSIS | ||
| 99 | |||
| 100 | package main; | ||
| 101 | |||
| 102 | use Faker::Plugin::JaJp::AddressPrefecture; | ||
| 103 | |||
| 104 | my $plugin = Faker::Plugin::JaJp::AddressPrefecture->new; | ||
| 105 | |||
| 106 | # bless(..., "Faker::Plugin::JaJp::AddressPrefecture") | ||
| 107 | |||
| 108 | =cut | ||
| 109 | |||
| 110 | =head1 DESCRIPTION | ||
| 111 | |||
| 112 | This package provides methods for generating fake data for address prefecture. | ||
| 113 | |||
| 114 | =encoding utf8 | ||
| 115 | |||
| 116 | =cut | ||
| 117 | |||
| 118 | =head1 INHERITS | ||
| 119 | |||
| 120 | This package inherits behaviors from: | ||
| 121 | |||
| 122 | L<Faker::Plugin::JaJp> | ||
| 123 | |||
| 124 | =cut | ||
| 125 | |||
| 126 | =head1 METHODS | ||
| 127 | |||
| 128 | This package provides the following methods: | ||
| 129 | |||
| 130 | =cut | ||
| 131 | |||
| 132 | =head2 execute | ||
| 133 | |||
| 134 | execute(HashRef $data) (Str) | ||
| 135 | |||
| 136 | The execute method returns a returns a random fake address prefecture. | ||
| 137 | |||
| 138 | I<Since C<1.10>> | ||
| 139 | |||
| 140 | =over 4 | ||
| 141 | |||
| 142 | =item execute example 1 | ||
| 143 | |||
| 144 | package main; | ||
| 145 | |||
| 146 | use Faker::Plugin::JaJp::AddressPrefecture; | ||
| 147 | |||
| 148 | my $plugin = Faker::Plugin::JaJp::AddressPrefecture->new; | ||
| 149 | |||
| 150 | # bless(..., "Faker::Plugin::JaJp::AddressPrefecture") | ||
| 151 | |||
| 152 | # my $result = $plugin->execute; | ||
| 153 | |||
| 154 | # '石川県'; | ||
| 155 | |||
| 156 | # my $result = $plugin->execute; | ||
| 157 | |||
| 158 | # '長野県'; | ||
| 159 | |||
| 160 | # my $result = $plugin->execute; | ||
| 161 | |||
| 162 | # '佐賀県'; | ||
| 163 | |||
| 164 | =back | ||
| 165 | |||
| 166 | =cut | ||
| 167 | |||
| 168 | =head2 new | ||
| 169 | |||
| 170 | new(HashRef $data) (Plugin) | ||
| 171 | |||
| 172 | The new method returns a new instance of the class. | ||
| 173 | |||
| 174 | I<Since C<1.10>> | ||
| 175 | |||
| 176 | =over 4 | ||
| 177 | |||
| 178 | =item new example 1 | ||
| 179 | |||
| 180 | package main; | ||
| 181 | |||
| 182 | use Faker::Plugin::JaJp::AddressPrefecture; | ||
| 183 | |||
| 184 | my $plugin = Faker::Plugin::JaJp::AddressPrefecture->new; | ||
| 185 | |||
| 186 | # bless(..., "Faker::Plugin::JaJp::AddressPrefecture") | ||
| 187 | |||
| 188 | =back | ||
| 189 | |||
| 190 | =cut | ||
| 191 | |||
| 192 | =head1 AUTHORS | ||
| 193 | |||
| 194 | Awncorp, C<awncorp@cpan.org> | ||
| 195 | |||
| 196 | =cut | ||
| 197 | |||
| 198 | =head1 LICENSE | ||
| 199 | |||
| 200 | Copyright (C) 2000, Al Newkirk. | ||
| 201 | |||
| 202 | This program is free software, you can redistribute it and/or modify it under | ||
| 203 | the terms of the Apache license version 2.0. | ||
| 204 | |||
| 205 | =cut | ||