view Lib/IMPL/Object/Meta.pm @ 178:658a80d19d33

new constructor syntax
author sourcer
date Wed, 12 Oct 2011 00:06:07 +0300 (2011-10-11)
parents 4267a2ac3d46
children d1676be8afcc
line wrap: on
line source
package IMPL::Object::Meta;
use strict;
use warnings;

use parent qw(IMPL::Object);
use IMPL::Class::Property;
use IMPL::Class::Property::Direct;

BEGIN {
    public _direct property Container => prop_get | owner_set;
}

sub meta {
    my $class = shift;
    my $caller = caller;
    my $meta = $class->surrogate();
    $meta->IMPL::Object::Meta::Container(scalar caller);
    $meta->callCTOR(@_);
    $caller->set_meta($meta);
}

1;

__END__

=pod

=head1 SYNOPSIS

package Foo;

meta BarAttribute('Simple bar attribute'); #mark Foo with BarAttribute

=head1 DESCRIPTION

������� ����� ��� ����-������� ������. ���������� �������� C< meta > ��� �������� ���������� � ��������� ������.

=head1 MEMBERS

=over

=item C< Container >

�������� ����������� �� ������ ������������ � �������� ��� ������ � �������� ����������� �������.

=back

=cut