49
|
1 package IMPL::Security::Principal;
|
|
2 use strict;
|
|
3 use warnings;
|
|
4
|
230
|
5 use IMPL::Const qw(:prop);
|
|
6 use IMPL::require {
|
|
7 AbstractPrincipal => 'IMPL::Security::AbstractPrincipal'
|
|
8 };
|
|
9 use IMPL::declare {
|
|
10 base => [
|
|
11 'IMPL::Object' => undef,
|
|
12 'IMPL::Object::Autofill' => '@_',
|
|
13 'IMPL::Security::AbstractPrincipal' => undef
|
|
14 ],
|
|
15 props => [
|
|
16 @{AbstractPrincipal->abstractProps()}
|
|
17 ]
|
|
18 };
|
97
|
19
|
230
|
20 __PACKAGE__->abstractProps([]);
|
49
|
21
|
|
22 my $nobody;
|
|
23
|
|
24 sub nobody {
|
74
|
25 $nobody = $_[0]->new(name => 'nobody', description => '') unless $nobody;
|
49
|
26 return $nobody;
|
|
27 }
|
|
28
|
|
29 1;
|
74
|
30
|
|
31 __END__
|
|
32
|
|
33 =pod
|
|
34
|
|
35 =head1 NAME
|
|
36
|
180
|
37 C<IMPL::Security::Principal> Идентификатор пользователя
|
74
|
38
|
|
39 C<[Autofill]>
|
|
40
|
|
41 =head1 MEMBERS
|
|
42
|
|
43 =over
|
|
44
|
|
45 =item C<CTOR(%props)>
|
|
46
|
180
|
47 Создает новый объект.
|
74
|
48
|
|
49 =item C<[get] name>
|
|
50
|
180
|
51 Возвращает имя пользователя.
|
74
|
52
|
|
53 =item C<[get,set] description>
|
|
54
|
180
|
55 Возвращает описание пользователя.
|
74
|
56
|
|
57 =back
|
|
58
|
|
59 =cut
|