49
|
1 package IMPL::Class::Member;
|
|
2 use strict;
|
165
|
3 use parent qw(Exporter);
|
49
|
4 our @EXPORT = qw(virtual public private protected);
|
|
5
|
|
6 use IMPL::Class::Meta;
|
|
7 require IMPL::Class::MemberInfo;
|
|
8
|
228
|
9 #TODO: remove
|
49
|
10 use constant {
|
|
11 MOD_PUBLIC => 1,
|
|
12 MOD_PROTECTED => 2,
|
|
13 MOD_PRIVATE => 3
|
|
14 };
|
|
15
|
|
16 sub public($) {
|
275
|
17 $_[0]->access(MOD_PUBLIC);
|
49
|
18 $_[0]->Implement;
|
|
19 $_[0];
|
|
20 }
|
|
21
|
|
22 sub private($) {
|
275
|
23 $_[0]->access(MOD_PRIVATE);
|
49
|
24 $_[0]->Implement;
|
|
25 $_[0];
|
|
26 }
|
|
27
|
|
28 sub protected($) {
|
275
|
29 $_[0]->access(MOD_PROTECTED);
|
49
|
30 $_[0]->Implement;
|
|
31 $_[0];
|
|
32 }
|
|
33 1;
|