Mercurial > pub > Impl
annotate Lib/IMPL/Object/Meta.pm @ 348:f116cd9fe7d9
working on TTView: pre-alpha version
author | cin |
---|---|
date | Thu, 03 Oct 2013 19:48:57 +0400 |
parents | 4ddb27ff4a0b |
children |
rev | line source |
---|---|
49 | 1 package IMPL::Object::Meta; |
2 use strict; | |
3 use warnings; | |
4 | |
278 | 5 use IMPL::Const qw(:prop); |
6 use IMPL::declare { | |
7 base => [ | |
8 'IMPL::Object' => undef | |
9 ], | |
10 props => [ | |
11 owner => PROP_RO | |
12 ] | |
13 }; | |
49 | 14 |
15 sub meta { | |
16 my $class = shift; | |
17 my $caller = caller; | |
18 my $meta = $class->surrogate(); | |
278 | 19 $meta->owner(scalar caller); |
49 | 20 $meta->callCTOR(@_); |
278 | 21 $caller->SetMeta($meta); |
49 | 22 } |
23 | |
63
76b878ad6596
Added serialization support for the IMPL::Object::List
wizard
parents:
49
diff
changeset
|
24 1; |
49 | 25 |
63
76b878ad6596
Added serialization support for the IMPL::Object::List
wizard
parents:
49
diff
changeset
|
26 __END__ |
76b878ad6596
Added serialization support for the IMPL::Object::List
wizard
parents:
49
diff
changeset
|
27 |
76b878ad6596
Added serialization support for the IMPL::Object::List
wizard
parents:
49
diff
changeset
|
28 =pod |
76b878ad6596
Added serialization support for the IMPL::Object::List
wizard
parents:
49
diff
changeset
|
29 |
76b878ad6596
Added serialization support for the IMPL::Object::List
wizard
parents:
49
diff
changeset
|
30 =head1 SYNOPSIS |
76b878ad6596
Added serialization support for the IMPL::Object::List
wizard
parents:
49
diff
changeset
|
31 |
76b878ad6596
Added serialization support for the IMPL::Object::List
wizard
parents:
49
diff
changeset
|
32 package Foo; |
76b878ad6596
Added serialization support for the IMPL::Object::List
wizard
parents:
49
diff
changeset
|
33 |
76b878ad6596
Added serialization support for the IMPL::Object::List
wizard
parents:
49
diff
changeset
|
34 meta BarAttribute('Simple bar attribute'); #mark Foo with BarAttribute |
76b878ad6596
Added serialization support for the IMPL::Object::List
wizard
parents:
49
diff
changeset
|
35 |
76b878ad6596
Added serialization support for the IMPL::Object::List
wizard
parents:
49
diff
changeset
|
36 =head1 DESCRIPTION |
76b878ad6596
Added serialization support for the IMPL::Object::List
wizard
parents:
49
diff
changeset
|
37 |
180 | 38 Базовый класс для мета-свойств класса. Определяет оператор C< meta > для создания метаданных в вызвавшем классе. |
63
76b878ad6596
Added serialization support for the IMPL::Object::List
wizard
parents:
49
diff
changeset
|
39 |
76b878ad6596
Added serialization support for the IMPL::Object::List
wizard
parents:
49
diff
changeset
|
40 =head1 MEMBERS |
76b878ad6596
Added serialization support for the IMPL::Object::List
wizard
parents:
49
diff
changeset
|
41 |
76b878ad6596
Added serialization support for the IMPL::Object::List
wizard
parents:
49
diff
changeset
|
42 =over |
76b878ad6596
Added serialization support for the IMPL::Object::List
wizard
parents:
49
diff
changeset
|
43 |
76b878ad6596
Added serialization support for the IMPL::Object::List
wizard
parents:
49
diff
changeset
|
44 =item C< Container > |
76b878ad6596
Added serialization support for the IMPL::Object::List
wizard
parents:
49
diff
changeset
|
45 |
180 | 46 Свойство заполняется до вызова конструктора и содержит имя модуля к которому применяется атрибут. |
63
76b878ad6596
Added serialization support for the IMPL::Object::List
wizard
parents:
49
diff
changeset
|
47 |
76b878ad6596
Added serialization support for the IMPL::Object::List
wizard
parents:
49
diff
changeset
|
48 =back |
76b878ad6596
Added serialization support for the IMPL::Object::List
wizard
parents:
49
diff
changeset
|
49 |
180 | 50 =cut |