0
|
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; |