File Coverage

blib/lib/Faker/Plugin/JaJp/AddressWard.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::JaJp::AddressWard;
2              
3 3     3   39122 use 5.018;
  3         12  
4              
5 3     3   18 use strict;
  3         8  
  3         71  
6 3     3   19 use warnings;
  3         6  
  3         105  
7              
8 3     3   15 use Venus::Class 'base';
  3         10  
  3         31  
9              
10             base 'Faker::Plugin::JaJp';
11              
12             # VERSION
13              
14             our $VERSION = '1.19';
15              
16             # METHODS
17              
18             sub execute {
19 9     9 1 1123 my ($self, $data) = @_;
20              
21 9         31 return $self->process_format(
22             $self->faker->random->select(data_for_address_ward())
23             );
24             }
25              
26             sub data_for_address_ward {
27 9     9 0 48 state $address_ward = [
28             '中央',
29             '北',
30             '東',
31             '南',
32             '西',
33             ]
34             }
35              
36             1;
37              
38              
39              
40             =head1 NAME
41              
42             Faker::Plugin::JaJp::AddressWard - Address Ward
43              
44             =cut
45              
46             =head1 ABSTRACT
47              
48             Address Ward 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::JaJp::AddressWard;
63              
64             my $plugin = Faker::Plugin::JaJp::AddressWard->new;
65              
66             # bless(..., "Faker::Plugin::JaJp::AddressWard")
67              
68             =cut
69              
70             =head1 DESCRIPTION
71              
72             This package provides methods for generating fake data for address ward.
73              
74             =encoding utf8
75              
76             =cut
77              
78             =head1 INHERITS
79              
80             This package inherits behaviors from:
81              
82             L
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 ward.
97              
98             I>
99              
100             =over 4
101              
102             =item execute example 1
103              
104             package main;
105              
106             use Faker::Plugin::JaJp::AddressWard;
107              
108             my $plugin = Faker::Plugin::JaJp::AddressWard->new;
109              
110             # bless(..., "Faker::Plugin::JaJp::AddressWard")
111              
112             # my $result = $plugin->execute;
113              
114             # '北';
115              
116             # my $result = $plugin->execute;
117              
118             # '東';
119              
120             # my $result = $plugin->execute;
121              
122             # '西';
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>
135              
136             =over 4
137              
138             =item new example 1
139              
140             package main;
141              
142             use Faker::Plugin::JaJp::AddressWard;
143              
144             my $plugin = Faker::Plugin::JaJp::AddressWard->new;
145              
146             # bless(..., "Faker::Plugin::JaJp::AddressWard")
147              
148             =back
149              
150             =cut
151              
152             =head1 AUTHORS
153              
154             Awncorp, C
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