Mercurial > pub > Impl
comparison Lib/IMPL/Class/Member.pm @ 0:03e58a454b20
Создан репозитарий
author | Sergey |
---|---|
date | Tue, 14 Jul 2009 12:54:37 +0400 |
parents | |
children | 16ada169ca75 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:03e58a454b20 |
---|---|
1 package IMPL::Class::Member; | |
2 use strict; | |
3 use base qw(Exporter); | |
4 our @EXPORT = qw(virtual public private protected); | |
5 | |
6 use IMPL::Class::Meta; | |
7 require IMPL::Class::MemberInfo; | |
8 | |
9 use constant { | |
10 MOD_PUBLIC => 1, | |
11 MOD_PROTECTED => 2, | |
12 MOD_PRIVATE => 3 | |
13 }; | |
14 | |
15 sub virtual($) { | |
16 $_[0]->Virtual(1); | |
17 $_[0]; | |
18 } | |
19 | |
20 sub public($) { | |
21 $_[0]->Access(MOD_PUBLIC); | |
22 $_[0]->Implement; | |
23 $_[0]; | |
24 } | |
25 | |
26 sub private($) { | |
27 $_[0]->Access(MOD_PRIVATE); | |
28 $_[0]->Implement; | |
29 $_[0]; | |
30 } | |
31 | |
32 sub protected($) { | |
33 $_[0]->Access(MOD_PROTECTED); | |
34 $_[0]->Implement; | |
35 $_[0]; | |
36 } | |
37 1; |