Faker/Plugin/CompanyDescription.pm untested

filter: Statementstmt 0.0% 0 / 30 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 7 Podpod n/a totaltotal 0.0% 0 / 37 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 package Faker::Plugin::CompanyDescription;
2  
3 use 5.014;
4  
5 use strict;
6 use warnings;
7  
8 use registry;
9 use routines;
10  
11 use Data::Object::Class;
12 use Data::Object::ClassHas;
13  
14 extends 'Data::Object::Plugin';
15  
16 our $VERSION = '1.03'; # VERSION
17  
18 # ATTRIBUTES
19  
20 has 'faker' => (
21 is => 'ro',
22 isa => 'ConsumerOf["Faker::Maker"]',
23 req => 1,
24 );
25  
26 # METHODS
27  
28 method execute() {
29 my $faker = $self->faker;
30  
31 my $does = $faker->random_item([
32 'Delivers',
33 'Excels at',
34 'Offering',
35 'Best-in-class for'
36 ]);
37  
38 return join ' ', $does,
39 $faker->company_jargon_prop_word,
40 $faker->company_jargon_edge_word,
41 $faker->company_jargon_buzz_word;
42 }
43  
44 1;
45  
46 =encoding utf8
47  
48 =head1 NAME
49  
50 Faker::Plugin::CompanyDescription
51  
52 =cut
53  
54 =head1 ABSTRACT
55  
56 Company Description Plugin for Faker
57  
58 =cut
59  
60 =head1 SYNOPSIS
61  
62 package main;
63  
64 use Faker;
65 use Faker::Plugin::CompanyDescription;
66  
67 my $f = Faker->new;
68 my $p = Faker::Plugin::CompanyDescription->new(faker => $f);
69  
70 my $plugin = $p;
71  
72 =cut
73  
74 =head1 DESCRIPTION
75  
76 This package provides methods for generating fake company description data.
77  
78 =cut
79  
80 =head1 INHERITS
81  
82 This package inherits behaviors from:
83  
84 L<Data::Object::Plugin>
85  
86 =cut
87  
88 =head1 LIBRARIES
89  
90 This package uses type constraints from:
91  
92 L<Types::Standard>
93  
94 =cut
95  
96 =head1 ATTRIBUTES
97  
98 This package has the following attributes:
99  
100 =cut
101  
102 =head2 faker
103  
104 faker(ConsumerOf["Faker::Maker"])
105  
106 This attribute is read-only, accepts C<(ConsumerOf["Faker::Maker"])> values, and is required.
107  
108 =cut
109  
110 =head1 METHODS
111  
112 This package implements the following methods:
113  
114 =cut
115  
116 =head2 execute
117  
118 execute() : Str
119  
120 The execute method returns a random fake company description.
121  
122 =over 4
123  
124 =item execute example #1
125  
126 # given: synopsis
127  
128 $p->execute;
129  
130 =back
131  
132 =cut
133  
134 =head1 AUTHOR
135  
136 Al Newkirk, C<awncorp@cpan.org>
137  
138 =head1 LICENSE
139  
140 Copyright (C) 2011-2019, Al Newkirk, et al.
141  
142 This is free software; you can redistribute it and/or modify it under the terms
143 of the The Apache License, Version 2.0, as elucidated in the L<"license
144 file"|https://github.com/iamalnewkirk/faker/blob/master/LICENSE>.
145  
146 =head1 ACKNOWLEDGEMENTS
147  
148 Parts of this library were inspired by the following implementations:
149  
150 L<PHP Faker|https://github.com/fzaninotto/Faker>
151  
152 L<Ruby Faker|https://github.com/stympy/faker>
153  
154 L<Python Faker|https://github.com/joke2k/faker>
155  
156 L<JS Faker|https://github.com/Marak/faker.js>
157  
158 L<Elixir Faker|https://github.com/elixirs/faker>
159  
160 =head1 PROJECT
161  
162 L<Wiki|https://github.com/iamalnewkirk/faker/wiki>
163  
164 L<Project|https://github.com/iamalnewkirk/faker>
165  
166 L<Initiatives|https://github.com/iamalnewkirk/faker/projects>
167  
168 L<Milestones|https://github.com/iamalnewkirk/faker/milestones>
169  
170 L<Contributing|https://github.com/iamalnewkirk/faker/blob/master/CONTRIBUTE.md>
171  
172 L<Issues|https://github.com/iamalnewkirk/faker/issues>
173  
174 =cut