Faker/Plugin/EnUs/InternetEmailAddress.pm

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