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