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 virtual($) {
|
|
17 $_[0]->Virtual(1);
|
|
18 $_[0];
|
|
19 }
|
|
20
|
|
21 sub public($) {
|
|
22 $_[0]->Access(MOD_PUBLIC);
|
|
23 $_[0]->Implement;
|
|
24 $_[0];
|
|
25 }
|
|
26
|
|
27 sub private($) {
|
|
28 $_[0]->Access(MOD_PRIVATE);
|
|
29 $_[0]->Implement;
|
|
30 $_[0];
|
|
31 }
|
|
32
|
|
33 sub protected($) {
|
|
34 $_[0]->Access(MOD_PROTECTED);
|
|
35 $_[0]->Implement;
|
|
36 $_[0];
|
|
37 }
|
|
38 1;
|