File Coverage

blib/lib/Faker/Plugin/UserPassword.pm
Criterion Covered Total %
statement 14 14 100.0
branch n/a
condition n/a
subroutine 5 5 100.0
pod 1 1 100.0
total 20 20 100.0


line stmt bran cond sub pod time code
1             package Faker::Plugin::UserPassword;
2              
3 2     2   21696 use 5.018;
  2         8  
4              
5 2     2   14 use strict;
  2         4  
  2         49  
6 2     2   11 use warnings;
  2         4  
  2         95  
7              
8 2     2   15 use Venus::Class 'base';
  2         5  
  2         16  
9              
10             base 'Faker::Plugin';
11              
12             # VERSION
13              
14             our $VERSION = '1.17';
15              
16             # METHODS
17              
18             sub execute {
19 6     6 1 2550 my ($self, $data) = @_;
20              
21 6         25 my $random = $self->faker->random;
22              
23 6         23 return $random->collect($random->range(12,20), 'character');
24             }
25              
26             1;
27              
28              
29              
30             =head1 NAME
31              
32             Faker::Plugin::UserPassword - User Password
33              
34             =cut
35              
36             =head1 ABSTRACT
37              
38             User Password for Faker
39              
40             =cut
41              
42             =head1 VERSION
43              
44             1.17
45              
46             =cut
47              
48             =head1 SYNOPSIS
49              
50             package main;
51              
52             use Faker::Plugin::UserPassword;
53              
54             my $plugin = Faker::Plugin::UserPassword->new;
55              
56             # bless(..., "Faker::Plugin::UserPassword")
57              
58             =cut
59              
60             =head1 DESCRIPTION
61              
62             This package provides methods for generating fake data for user password.
63              
64             =encoding utf8
65              
66             =cut
67              
68             =head1 INHERITS
69              
70             This package inherits behaviors from:
71              
72             L
73              
74             =cut
75              
76             =head1 METHODS
77              
78             This package provides the following methods:
79              
80             =cut
81              
82             =head2 execute
83              
84             execute(HashRef $data) (Str)
85              
86             The execute method returns a returns a random fake user password.
87              
88             I>
89              
90             =over 4
91              
92             =item execute example 1
93              
94             package main;
95              
96             use Faker::Plugin::UserPassword;
97              
98             my $plugin = Faker::Plugin::UserPassword->new;
99              
100             # bless(..., "Faker::Plugin::UserPassword")
101              
102             # my $result = $plugin->execute;
103              
104             # "48R+a}[Lb?&0725";
105              
106             # my $result = $plugin->execute;
107              
108             # ",0w\$h4155>*0M";
109              
110             # my $result = $plugin->execute;
111              
112             # ")P2^'q695a}8GX";
113              
114             =back
115              
116             =cut
117              
118             =head2 new
119              
120             new(HashRef $data) (Plugin)
121              
122             The new method returns a new instance of the class.
123              
124             I>
125              
126             =over 4
127              
128             =item new example 1
129              
130             package main;
131              
132             use Faker::Plugin::UserPassword;
133              
134             my $plugin = Faker::Plugin::UserPassword->new;
135              
136             # bless(..., "Faker::Plugin::UserPassword")
137              
138             =back
139              
140             =cut