line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Yukki::User; |
2
|
|
|
|
|
|
|
$Yukki::User::VERSION = '0.991_002'; # TRIAL |
3
|
|
|
|
|
|
|
|
4
|
1
|
|
|
1
|
|
3138
|
$Yukki::User::VERSION = '0.991002';use v5.24; |
|
1
|
|
|
|
|
7
|
|
5
|
1
|
|
|
1
|
|
9
|
use utf8; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
12
|
|
6
|
1
|
|
|
1
|
|
39
|
use Moo; |
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
10
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
with 'Yukki::Role::Savable'; |
9
|
|
|
|
|
|
|
|
10
|
1
|
|
|
1
|
|
673
|
use Types::Standard qw( Str ArrayRef ); |
|
1
|
|
|
|
|
8
|
|
|
1
|
|
|
|
|
18
|
|
11
|
1
|
|
|
1
|
|
1612
|
use Yukki::Types qw( LoginName ); |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
23
|
|
12
|
|
|
|
|
|
|
|
13
|
1
|
|
|
1
|
|
758
|
use namespace::clean; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
16
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
# ABSTRACT: Encapsulates Yukki users |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
has login_name => ( |
19
|
|
|
|
|
|
|
is => 'ro', |
20
|
|
|
|
|
|
|
isa => LoginName, |
21
|
|
|
|
|
|
|
required => 1, |
22
|
|
|
|
|
|
|
); |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
has password => ( |
26
|
|
|
|
|
|
|
is => 'rw', |
27
|
|
|
|
|
|
|
isa => Str, |
28
|
|
|
|
|
|
|
required => 1, |
29
|
|
|
|
|
|
|
); |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
has name => ( |
33
|
|
|
|
|
|
|
is => 'rw', |
34
|
|
|
|
|
|
|
isa => Str, |
35
|
|
|
|
|
|
|
required => 1, |
36
|
|
|
|
|
|
|
); |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
has email => ( |
40
|
|
|
|
|
|
|
is => 'rw', |
41
|
|
|
|
|
|
|
isa => Str, |
42
|
|
|
|
|
|
|
required => 1, |
43
|
|
|
|
|
|
|
); |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
has groups => ( |
47
|
|
|
|
|
|
|
is => 'ro', |
48
|
|
|
|
|
|
|
isa => ArrayRef[Str], |
49
|
|
|
|
|
|
|
required => 1, |
50
|
|
|
|
|
|
|
lazy => 1, |
51
|
|
|
|
|
|
|
default => sub { [] }, |
52
|
|
|
|
|
|
|
); |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
|
55
|
0
|
|
|
0
|
1
|
|
sub groups_string { join ' ', shift->groups->@* } |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
sub savable_attributes { |
59
|
0
|
|
|
0
|
1
|
|
qw( |
60
|
|
|
|
|
|
|
login_name |
61
|
|
|
|
|
|
|
password |
62
|
|
|
|
|
|
|
name |
63
|
|
|
|
|
|
|
email |
64
|
|
|
|
|
|
|
groups |
65
|
|
|
|
|
|
|
) |
66
|
|
|
|
|
|
|
} |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
1; |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
__END__ |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=pod |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=encoding UTF-8 |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=head1 NAME |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
Yukki::User - Encapsulates Yukki users |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=head1 VERSION |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
version 0.991_002 |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=head1 SYNOPSIS |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
use Yukki::User; |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
my $user_file = $app->locate('user_path', 'bob'); |
89
|
|
|
|
|
|
|
my $user = Yukki::User->load_yaml($user_file); |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
say "login name: ", $user->login_name; |
92
|
|
|
|
|
|
|
say "password: ", $user->password; |
93
|
|
|
|
|
|
|
say "name: ", $user->name; |
94
|
|
|
|
|
|
|
say "email: ", $user->email; |
95
|
|
|
|
|
|
|
say "groups: ", join(', ', $user->groups->@*); |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
=head1 DESCRIPTION |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
Encapsulates the definition of a user object. Users are defined to provide information about the author of each change in the wiki. |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
=head1 ROLES |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
L<Yukki::Role::Savable> |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
=head1 ATTRIBUTES |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
=head2 login_name |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
This is the name the user uses to login. |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
=head2 password |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
This is the hashed password for the user. |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
=head2 name |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
This is the full name of the user, used as the author name on commits. |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
=head2 email |
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
This is the email address of the user, used to uniquely identify the author in commits. |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
=head2 groups |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
This is the list of groups to which the user belongs. |
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
=head1 METHODS |
128
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
=head2 groups_string |
130
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
Returns the groups concatenated together into a single string. |
132
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
=head2 savable_attributes |
134
|
|
|
|
|
|
|
|
135
|
|
|
|
|
|
|
Returns the savable attributes. |
136
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
=head1 AUTHOR |
138
|
|
|
|
|
|
|
|
139
|
|
|
|
|
|
|
Andrew Sterling Hanenkamp <hanenkamp@cpan.org> |
140
|
|
|
|
|
|
|
|
141
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
142
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
This software is copyright (c) 2017 by Qubling Software LLC. |
144
|
|
|
|
|
|
|
|
145
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
146
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
147
|
|
|
|
|
|
|
|
148
|
|
|
|
|
|
|
=cut |