Mercurial > pub > Impl
comparison lib/IMPL/Security/Principal.pm @ 407:c6e90e02dd17 ref20150831
renamed Lib->lib
author | cin |
---|---|
date | Fri, 04 Sep 2015 19:40:23 +0300 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
406:f23fcb19d3c1 | 407:c6e90e02dd17 |
---|---|
1 package IMPL::Security::Principal; | |
2 use strict; | |
3 use warnings; | |
4 | |
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 isNobody => PROP_RW | |
18 ] | |
19 }; | |
20 | |
21 __PACKAGE__->abstractProps([]); | |
22 | |
23 my $nobody; | |
24 | |
25 sub nobody { | |
26 $nobody = $_[0]->new(name => 'nobody', description => '', isNobody => 1) unless $nobody; | |
27 return $nobody; | |
28 } | |
29 | |
30 1; | |
31 | |
32 __END__ | |
33 | |
34 =pod | |
35 | |
36 =head1 NAME | |
37 | |
38 C<IMPL::Security::Principal> Идентификатор пользователя | |
39 | |
40 C<[Autofill]> | |
41 | |
42 =head1 MEMBERS | |
43 | |
44 =over | |
45 | |
46 =item C<CTOR(%props)> | |
47 | |
48 Создает новый объект. | |
49 | |
50 =item C<[get] name> | |
51 | |
52 Возвращает имя пользователя. | |
53 | |
54 =item C<[get,set] description> | |
55 | |
56 Возвращает описание пользователя. | |
57 | |
58 =back | |
59 | |
60 =cut |