Faker/Plugin/JaJp/InternetEmailAddress.pm

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