annotate Lib/IMPL/Object/Meta.pm @ 265:6b6d4b2275a1

improved documentation
author cin
date Thu, 10 Jan 2013 03:25:02 +0400
parents d1676be8afcc
children 4ddb27ff4a0b
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
49
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 0
diff changeset
1 package IMPL::Object::Meta;
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 0
diff changeset
2 use strict;
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 0
diff changeset
3 use warnings;
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 0
diff changeset
4
166
4267a2ac3d46 Added Class::Template,
wizard
parents: 132
diff changeset
5 use parent qw(IMPL::Object);
49
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 0
diff changeset
6 use IMPL::Class::Property;
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 0
diff changeset
7 use IMPL::Class::Property::Direct;
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 0
diff changeset
8
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 0
diff changeset
9 BEGIN {
63
76b878ad6596 Added serialization support for the IMPL::Object::List
wizard
parents: 49
diff changeset
10 public _direct property Container => prop_get | owner_set;
49
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 0
diff changeset
11 }
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 0
diff changeset
12
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 0
diff changeset
13 sub meta {
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 0
diff changeset
14 my $class = shift;
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 0
diff changeset
15 my $caller = caller;
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 0
diff changeset
16 my $meta = $class->surrogate();
132
42fbb38d4a48 minor changes
wizard
parents: 63
diff changeset
17 $meta->IMPL::Object::Meta::Container(scalar caller);
49
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 0
diff changeset
18 $meta->callCTOR(@_);
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 0
diff changeset
19 $caller->set_meta($meta);
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 0
diff changeset
20 }
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 0
diff changeset
21
63
76b878ad6596 Added serialization support for the IMPL::Object::List
wizard
parents: 49
diff changeset
22 1;
49
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 0
diff changeset
23
63
76b878ad6596 Added serialization support for the IMPL::Object::List
wizard
parents: 49
diff changeset
24 __END__
76b878ad6596 Added serialization support for the IMPL::Object::List
wizard
parents: 49
diff changeset
25
76b878ad6596 Added serialization support for the IMPL::Object::List
wizard
parents: 49
diff changeset
26 =pod
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 =head1 SYNOPSIS
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 package Foo;
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 meta BarAttribute('Simple bar attribute'); #mark Foo with BarAttribute
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 =head1 DESCRIPTION
76b878ad6596 Added serialization support for the IMPL::Object::List
wizard
parents: 49
diff changeset
35
180
d1676be8afcc Перекодировка в utf-8
sourcer
parents: 166
diff changeset
36 Базовый класс для мета-свойств класса. Определяет оператор C< meta > для создания метаданных в вызвавшем классе.
63
76b878ad6596 Added serialization support for the IMPL::Object::List
wizard
parents: 49
diff changeset
37
76b878ad6596 Added serialization support for the IMPL::Object::List
wizard
parents: 49
diff changeset
38 =head1 MEMBERS
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 =over
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 =item C< Container >
76b878ad6596 Added serialization support for the IMPL::Object::List
wizard
parents: 49
diff changeset
43
180
d1676be8afcc Перекодировка в utf-8
sourcer
parents: 166
diff changeset
44 Свойство заполняется до вызова конструктора и содержит имя модуля к которому применяется атрибут.
63
76b878ad6596 Added serialization support for the IMPL::Object::List
wizard
parents: 49
diff changeset
45
76b878ad6596 Added serialization support for the IMPL::Object::List
wizard
parents: 49
diff changeset
46 =back
76b878ad6596 Added serialization support for the IMPL::Object::List
wizard
parents: 49
diff changeset
47
180
d1676be8afcc Перекодировка в utf-8
sourcer
parents: 166
diff changeset
48 =cut