Faker/Plugin/UserLogin.pm

filter: Statementstmt 100% 17 / 17 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod 50.0% 1 / 2 totaltotal 96.0% 24 / 25 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Faker/Plugin/SoftwareVersion.pm ↑ Summary Faker/Plugin/EnUs/InternetEmailAddress.pm »
1 package Faker::Plugin::UserLogin;
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_markers(
22 $self->process_format($self->faker->random->select(format_for_username()))
23 );
24 }
25  
26 6 ▶sub format_for_username {
Subroutine format_for_username: called CC=1 SCAR=0.0
Pod undocumented
27 6 state $name = [
28 '{{person_last_name}}.{{person_first_name}}',
29 '{{person_first_name}}.{{person_last_name}}',
30 '{{person_first_name}}##',
31 '{{person_first_name}}####',
32 '?{{person_last_name}}',
33 '?{{person_last_name}}####',
34 ]
35 }
36  
37 2 1;
38  
39  
40  
41 =head1 NAME
42  
43 Faker::Plugin::UserLogin - User Login
44  
45 =cut
46  
47 =head1 ABSTRACT
48  
49 User Login 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::UserLogin;
64  
65 my $plugin = Faker::Plugin::UserLogin->new;
66  
67 # bless(..., "Faker::Plugin::UserLogin")
68  
69 =cut
70  
71 =head1 DESCRIPTION
72  
73 This package provides methods for generating fake data for user login.
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 user login.
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::UserLogin;
108  
109 my $plugin = Faker::Plugin::UserLogin->new(
110 faker => {locales => ['en-us']},
111 );
112  
113 # bless(..., "Faker::Plugin::UserLogin")
114  
115 # my $result = $plugin->execute;
116  
117 # "Russel44";
118  
119 # my $result = $plugin->execute;
120  
121 # "aMayer7694";
122  
123 # my $result = $plugin->execute;
124  
125 # "Amalia89";
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::UserLogin;
146  
147 my $plugin = Faker::Plugin::UserLogin->new;
148  
149 # bless(..., "Faker::Plugin::UserLogin")
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
« Faker/Plugin/SoftwareVersion.pm ↑ Summary Faker/Plugin/EnUs/InternetEmailAddress.pm »