Mercurial > pub > Impl
comparison Lib/IMPL/Class/Member.pm @ 277:6585464c4664
sync (unstable)
author | sergey |
---|---|
date | Fri, 01 Feb 2013 16:37:59 +0400 |
parents | 8a5da17d7ef9 |
children | 4ddb27ff4a0b |
comparison
equal
deleted
inserted
replaced
276:8a5da17d7ef9 | 277:6585464c4664 |
---|---|
1 package IMPL::Class::Member; | 1 package IMPL::Class::Member; |
2 use strict; | 2 use strict; |
3 use parent qw(Exporter); | 3 use parent qw(Exporter); |
4 our @EXPORT = qw(virtual public private protected); | 4 our @EXPORT = qw(&public &private &protected); |
5 | 5 |
6 | 6 |
7 use IMPL::Const qw(:access); | 7 use IMPL::Const qw(:access); |
8 | 8 |
9 use IMPL::Class::Meta; | |
10 require IMPL::Class::MemberInfo; | 9 require IMPL::Class::MemberInfo; |
11 | 10 |
12 sub public($) { | 11 sub public($) { |
13 my $info = shift; | 12 my $info = shift; |
14 $info->{access} = ACCESS_PUBLIC; | 13 $info->{access} = ACCESS_PUBLIC; |
27 my $info = shift; | 26 my $info = shift; |
28 $info->{access} = ACCESS_PROTECTED; | 27 $info->{access} = ACCESS_PROTECTED; |
29 my ($class,$implementor) = delete $info->{'class','-implementor'}; | 28 my ($class,$implementor) = delete $info->{'class','-implementor'}; |
30 $class->$implementor($info); | 29 $class->$implementor($info); |
31 } | 30 } |
31 | |
32 1; | 32 1; |