| 1 | package Faker::Plugin::EsEs::CompanyName; | ||
| 2 | |||
| 3 | 5 | ▶ | use 5.018; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | |||
| 5 | 5 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | 5 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | |||
| 8 | 5 | ▶ | use Venus::Class 'base'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | |||
| 10 | 5 | base 'Faker::Plugin::EsEs'; | |
| 11 | |||
| 12 | # VERSION | ||
| 13 | |||
| 14 | 5 | our $VERSION = '1.19'; | |
| 15 | |||
| 16 | # METHODS | ||
| 17 | |||
| 18 | 13 | ▶ | sub execute { |
|
Subroutine
execute: called CC=1 SCAR=0.0
Pod
documented
| |||
| 19 | 13 | my ($self, $data) = @_; | |
| 20 | |||
| 21 | 13 | return $self->process_format( | |
| 22 | $self->faker->random->select(format_for_company_name()) | ||
| 23 | ); | ||
| 24 | } | ||
| 25 | |||
| 26 | 13 | ▶ | sub format_for_company_name { |
|
Subroutine
format_for_company_name: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 27 | 13 | state $name = [ | |
| 28 | '{{company_name_prefix}} {{person_last_name}} {{company_name_suffix}}', | ||
| 29 | '{{company_name_prefix}} {{person_last_name}}', | ||
| 30 | '{{company_name_prefix}} {{person_last_name}}-{{person_last_name}}', | ||
| 31 | '{{person_last_name}}-{{person_last_name}} {{company_name_suffix}}', | ||
| 32 | '{{person_last_name}} y {{person_last_name}} {{company_name_suffix}}', | ||
| 33 | '{{person_last_name}} de {{person_last_name}} {{company_name_suffix}}', | ||
| 34 | '{{person_last_name}}, {{person_last_name}} y {{person_last_name}} {{company_name_suffix}}', | ||
| 35 | '{{person_last_name}}-{{person_last_name}}', | ||
| 36 | '{{person_last_name}} y {{person_last_name}}', | ||
| 37 | '{{person_last_name}} de {{person_last_name}}', | ||
| 38 | ] | ||
| 39 | } | ||
| 40 | |||
| 41 | 5 | 1; | |
| 42 | |||
| 43 | |||
| 44 | |||
| 45 | =head1 NAME | ||
| 46 | |||
| 47 | Faker::Plugin::EsEs::CompanyName - Company Name | ||
| 48 | |||
| 49 | =cut | ||
| 50 | |||
| 51 | =head1 ABSTRACT | ||
| 52 | |||
| 53 | Company Name for Faker | ||
| 54 | |||
| 55 | =cut | ||
| 56 | |||
| 57 | =head1 VERSION | ||
| 58 | |||
| 59 | 1.19 | ||
| 60 | |||
| 61 | =cut | ||
| 62 | |||
| 63 | =head1 SYNOPSIS | ||
| 64 | |||
| 65 | package main; | ||
| 66 | |||
| 67 | use Faker::Plugin::EsEs::CompanyName; | ||
| 68 | |||
| 69 | my $plugin = Faker::Plugin::EsEs::CompanyName->new; | ||
| 70 | |||
| 71 | # bless(..., "Faker::Plugin::EsEs::CompanyName") | ||
| 72 | |||
| 73 | =cut | ||
| 74 | |||
| 75 | =head1 DESCRIPTION | ||
| 76 | |||
| 77 | This package provides methods for generating fake data for company name. | ||
| 78 | |||
| 79 | =encoding utf8 | ||
| 80 | |||
| 81 | =cut | ||
| 82 | |||
| 83 | =head1 INHERITS | ||
| 84 | |||
| 85 | This package inherits behaviors from: | ||
| 86 | |||
| 87 | L<Faker::Plugin::EsEs> | ||
| 88 | |||
| 89 | =cut | ||
| 90 | |||
| 91 | =head1 METHODS | ||
| 92 | |||
| 93 | This package provides the following methods: | ||
| 94 | |||
| 95 | =cut | ||
| 96 | |||
| 97 | =head2 execute | ||
| 98 | |||
| 99 | execute(HashRef $data) (Str) | ||
| 100 | |||
| 101 | The execute method returns a returns a random fake company name. | ||
| 102 | |||
| 103 | I<Since C<1.10>> | ||
| 104 | |||
| 105 | =over 4 | ||
| 106 | |||
| 107 | =item execute example 1 | ||
| 108 | |||
| 109 | package main; | ||
| 110 | |||
| 111 | use Faker::Plugin::EsEs::CompanyName; | ||
| 112 | |||
| 113 | my $plugin = Faker::Plugin::EsEs::CompanyName->new; | ||
| 114 | |||
| 115 | # bless(..., "Faker::Plugin::EsEs::CompanyName") | ||
| 116 | |||
| 117 | # my $result = $plugin->execute; | ||
| 118 | |||
| 119 | # 'Heredia-Serrato y Asoc.'; | ||
| 120 | |||
| 121 | # my $result = $plugin->execute; | ||
| 122 | |||
| 123 | # 'MontaƱo y Alcala'; | ||
| 124 | |||
| 125 | # my $result = $plugin->execute; | ||
| 126 | |||
| 127 | # 'Lozano, Lugo y Ferrer e Hijo'; | ||
| 128 | |||
| 129 | =back | ||
| 130 | |||
| 131 | =cut | ||
| 132 | |||
| 133 | =head2 new | ||
| 134 | |||
| 135 | new(HashRef $data) (Plugin) | ||
| 136 | |||
| 137 | The new method returns a new instance of the class. | ||
| 138 | |||
| 139 | I<Since C<1.10>> | ||
| 140 | |||
| 141 | =over 4 | ||
| 142 | |||
| 143 | =item new example 1 | ||
| 144 | |||
| 145 | package main; | ||
| 146 | |||
| 147 | use Faker::Plugin::EsEs::CompanyName; | ||
| 148 | |||
| 149 | my $plugin = Faker::Plugin::EsEs::CompanyName->new; | ||
| 150 | |||
| 151 | # bless(..., "Faker::Plugin::EsEs::CompanyName") | ||
| 152 | |||
| 153 | =back | ||
| 154 | |||
| 155 | =cut | ||
| 156 | |||
| 157 | =head1 AUTHORS | ||
| 158 | |||
| 159 | Awncorp, C<awncorp@cpan.org> | ||
| 160 | |||
| 161 | =cut | ||
| 162 | |||
| 163 | =head1 LICENSE | ||
| 164 | |||
| 165 | Copyright (C) 2000, Al Newkirk. | ||
| 166 | |||
| 167 | This program is free software, you can redistribute it and/or modify it under | ||
| 168 | the terms of the Apache license version 2.0. | ||
| 169 | |||
| 170 | =cut | ||