Faker/Plugin/PersonUsername.pm

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