| 1 | package Faker::Plugin::EsEs::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::EsEs'; | |
| 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 = lc $self->transliterate($email_address); | |
| 28 | |||
| 29 | 3 | $email_address =~ s/\s+/-/g; | |
| 30 | |||
| 31 | 3 | return $email_address; | |
| 32 | } | ||
| 33 | |||
| 34 | 3 | ▶ | sub data_for_internet_email_address { |
|
Subroutine
data_for_internet_email_address: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 35 | 3 | state $internet_email_address = [ | |
| 36 | '{{person_last_name}}.{{person_first_name}}@{{internet_domain_name}}', | ||
| 37 | '{{person_last_name}}.{{person_first_name}}@{{internet_email_domain}}', | ||
| 38 | '{{person_first_name}}.{{person_last_name}}@{{internet_domain_name}}', | ||
| 39 | '{{person_first_name}}.{{person_last_name}}@{{internet_email_domain}}', | ||
| 40 | '{{person_first_name}}##@{{internet_domain_name}}', | ||
| 41 | '{{person_first_name}}##@{{internet_email_domain}}', | ||
| 42 | '{{person_first_name}}####@{{internet_domain_name}}', | ||
| 43 | '{{person_first_name}}####@{{internet_email_domain}}', | ||
| 44 | '?{{person_last_name}}@{{internet_domain_name}}', | ||
| 45 | '?{{person_last_name}}@{{internet_email_domain}}', | ||
| 46 | '?{{person_last_name}}####@{{internet_domain_name}}', | ||
| 47 | '?{{person_last_name}}####@{{internet_email_domain}}', | ||
| 48 | ] | ||
| 49 | } | ||
| 50 | |||
| 51 | 1 | 1; | |
| 52 | |||
| 53 | |||
| 54 | |||
| 55 | =head1 NAME | ||
| 56 | |||
| 57 | Faker::Plugin::EsEs::InternetEmailAddress - Internet Email Address | ||
| 58 | |||
| 59 | =cut | ||
| 60 | |||
| 61 | =head1 ABSTRACT | ||
| 62 | |||
| 63 | Internet Email Address for Faker | ||
| 64 | |||
| 65 | =cut | ||
| 66 | |||
| 67 | =head1 VERSION | ||
| 68 | |||
| 69 | 1.19 | ||
| 70 | |||
| 71 | =cut | ||
| 72 | |||
| 73 | =head1 SYNOPSIS | ||
| 74 | |||
| 75 | package main; | ||
| 76 | |||
| 77 | use Faker::Plugin::EsEs::InternetEmailAddress; | ||
| 78 | |||
| 79 | my $plugin = Faker::Plugin::EsEs::InternetEmailAddress->new; | ||
| 80 | |||
| 81 | # bless(..., "Faker::Plugin::EsEs::InternetEmailAddress") | ||
| 82 | |||
| 83 | =cut | ||
| 84 | |||
| 85 | =head1 DESCRIPTION | ||
| 86 | |||
| 87 | This package provides methods for generating fake data for internet email address. | ||
| 88 | |||
| 89 | =encoding utf8 | ||
| 90 | |||
| 91 | =cut | ||
| 92 | |||
| 93 | =head1 INHERITS | ||
| 94 | |||
| 95 | This package inherits behaviors from: | ||
| 96 | |||
| 97 | L<Faker::Plugin::EsEs> | ||
| 98 | |||
| 99 | =cut | ||
| 100 | |||
| 101 | =head1 METHODS | ||
| 102 | |||
| 103 | This package provides the following methods: | ||
| 104 | |||
| 105 | =cut | ||
| 106 | |||
| 107 | =head2 execute | ||
| 108 | |||
| 109 | execute(HashRef $data) (Str) | ||
| 110 | |||
| 111 | The execute method returns a returns a random fake internet email address. | ||
| 112 | |||
| 113 | I<Since C<1.10>> | ||
| 114 | |||
| 115 | =over 4 | ||
| 116 | |||
| 117 | =item execute example 1 | ||
| 118 | |||
| 119 | package main; | ||
| 120 | |||
| 121 | use Faker::Plugin::EsEs::InternetEmailAddress; | ||
| 122 | |||
| 123 | my $plugin = Faker::Plugin::EsEs::InternetEmailAddress->new; | ||
| 124 | |||
| 125 | # bless(..., "Faker::Plugin::EsEs::InternetEmailAddress") | ||
| 126 | |||
| 127 | # my $result = $plugin->execute; | ||
| 128 | |||
| 129 | # 'rafael94@montano-y-alcala.org'; | ||
| 130 | |||
| 131 | # my $result = $plugin->execute; | ||
| 132 | |||
| 133 | # 'alba82@terra.com'; | ||
| 134 | |||
| 135 | # my $result = $plugin->execute; | ||
| 136 | |||
| 137 | # 'quesada.jordi@hotmail.com'; | ||
| 138 | |||
| 139 | =back | ||
| 140 | |||
| 141 | =cut | ||
| 142 | |||
| 143 | =head2 new | ||
| 144 | |||
| 145 | new(HashRef $data) (Plugin) | ||
| 146 | |||
| 147 | The new method returns a new instance of the class. | ||
| 148 | |||
| 149 | I<Since C<1.10>> | ||
| 150 | |||
| 151 | =over 4 | ||
| 152 | |||
| 153 | =item new example 1 | ||
| 154 | |||
| 155 | package main; | ||
| 156 | |||
| 157 | use Faker::Plugin::EsEs::InternetEmailAddress; | ||
| 158 | |||
| 159 | my $plugin = Faker::Plugin::EsEs::InternetEmailAddress->new; | ||
| 160 | |||
| 161 | # bless(..., "Faker::Plugin::EsEs::InternetEmailAddress") | ||
| 162 | |||
| 163 | =back | ||
| 164 | |||
| 165 | =cut | ||
| 166 | |||
| 167 | =head1 AUTHORS | ||
| 168 | |||
| 169 | Awncorp, C<awncorp@cpan.org> | ||
| 170 | |||
| 171 | =cut | ||
| 172 | |||
| 173 | =head1 LICENSE | ||
| 174 | |||
| 175 | Copyright (C) 2000, Al Newkirk. | ||
| 176 | |||
| 177 | This program is free software, you can redistribute it and/or modify it under | ||
| 178 | the terms of the Apache license version 2.0. | ||
| 179 | |||
| 180 | =cut | ||