Mercurial > pub > Impl
comparison Lib/IMPL/Object/Meta.pm @ 278:4ddb27ff4a0b
core refactoring
| author | cin |
|---|---|
| date | Mon, 04 Feb 2013 02:10:37 +0400 |
| parents | d1676be8afcc |
| children |
comparison
equal
deleted
inserted
replaced
| 277:6585464c4664 | 278:4ddb27ff4a0b |
|---|---|
| 1 package IMPL::Object::Meta; | 1 package IMPL::Object::Meta; |
| 2 use strict; | 2 use strict; |
| 3 use warnings; | 3 use warnings; |
| 4 | 4 |
| 5 use parent qw(IMPL::Object); | 5 use IMPL::Const qw(:prop); |
| 6 use IMPL::Class::Property; | 6 use IMPL::declare { |
| 7 use IMPL::Class::Property::Direct; | 7 base => [ |
| 8 | 8 'IMPL::Object' => undef |
| 9 BEGIN { | 9 ], |
| 10 public _direct property Container => prop_get | owner_set; | 10 props => [ |
| 11 } | 11 owner => PROP_RO |
| 12 ] | |
| 13 }; | |
| 12 | 14 |
| 13 sub meta { | 15 sub meta { |
| 14 my $class = shift; | 16 my $class = shift; |
| 15 my $caller = caller; | 17 my $caller = caller; |
| 16 my $meta = $class->surrogate(); | 18 my $meta = $class->surrogate(); |
| 17 $meta->IMPL::Object::Meta::Container(scalar caller); | 19 $meta->owner(scalar caller); |
| 18 $meta->callCTOR(@_); | 20 $meta->callCTOR(@_); |
| 19 $caller->set_meta($meta); | 21 $caller->SetMeta($meta); |
| 20 } | 22 } |
| 21 | 23 |
| 22 1; | 24 1; |
| 23 | 25 |
| 24 __END__ | 26 __END__ |
