view Lib/IMPL/Class/Member.pm @ 277:6585464c4664

sync (unstable)
author sergey
date Fri, 01 Feb 2013 16:37:59 +0400
parents 8a5da17d7ef9
children 4ddb27ff4a0b
line wrap: on
line source

package IMPL::Class::Member;
use strict;
use parent qw(Exporter);
our @EXPORT = qw(&public &private &protected);


use IMPL::Const qw(:access);

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;