Mercurial > pub > Impl
view Lib/IMPL/Class/Member.pm @ 276:8a5da17d7ef9
*IMPL::Class refactoring property definition mechanism (incomplete).
author | sergey |
---|---|
date | Thu, 31 Jan 2013 17:37:44 +0400 |
parents | 6253872024a4 |
children | 6585464c4664 |
line wrap: on
line source
package IMPL::Class::Member; use strict; use parent qw(Exporter); our @EXPORT = qw(virtual public private protected); use IMPL::Const qw(:access); use IMPL::Class::Meta; require IMPL::Class::MemberInfo; sub public($) { my $info = shift; $info->{access} = ACCESS_PUBLIC; my ($class,$implementor) = delete $info->{'class','-implementor'}; $class->$implementor($info); } sub private($) { my $info = shift; $info->{access} = ACCESS_PRIVATE; my ($class,$implementor) = delete $info->{'class','-implementor'}; $class->$implementor($info); } sub protected($) { my $info = shift; $info->{access} = ACCESS_PROTECTED; my ($class,$implementor) = delete $info->{'class','-implementor'}; $class->$implementor($info); } 1;