Mercurial > pub > Impl
comparison Lib/IMPL/Object.pm @ 180:d1676be8afcc
Перекодировка в utf-8
| author | sourcer | 
|---|---|
| date | Fri, 30 Dec 2011 23:40:00 +0300 | 
| parents | 76515373dac0 | 
| children | 6d8092d8ce1b | 
   comparison
  equal
  deleted
  inserted
  replaced
| 179:b3d91ff7aea9 | 180:d1676be8afcc | 
|---|---|
| 4 use parent qw(IMPL::Object::Abstract); | 4 use parent qw(IMPL::Object::Abstract); | 
| 5 | 5 | 
| 6 sub surrogate { | 6 sub surrogate { | 
| 7 bless {}, ref $_[0] || $_[0]; | 7 bless {}, ref $_[0] || $_[0]; | 
| 8 } | 8 } | 
| 9 | |
| 10 __PACKAGE__->static_accessor( propertyInfoClass => 'IMPL::Class::DirectPropertyInfo' ); | |
| 9 | 11 | 
| 10 sub new { | 12 sub new { | 
| 11 my $class = shift; | 13 my $class = shift; | 
| 12 my $self = bless {}, ref($class) || $class; | 14 my $self = bless {}, ref($class) || $class; | 
| 13 $self->callCTOR(@_); | 15 $self->callCTOR(@_); | 
| 84 | 86 | 
| 85 =end code | 87 =end code | 
| 86 | 88 | 
| 87 =head1 Description | 89 =head1 Description | 
| 88 | 90 | 
| 89 , . | 91 Базовый класс для объектов, основанных на хеше. | 
| 90 | 92 | 
| 91 =head1 Members | 93 =head1 Members | 
| 92 | 94 | 
| 93 =over | 95 =over | 
| 94 | 96 | 
| 95 =item operator C<new>(@args) | 97 =item operator C<new>(@args) | 
| 96 | 98 | 
| 97 @args. | 99 Создает экземпляр объекта и вызывает конструктор с параметрами @args. | 
| 98 | 100 | 
| 99 =item operator C<surrogate>() | 101 =item operator C<surrogate>() | 
| 100 | 102 | 
| 101 . | 103 Создает неинициализированный экземпляр объекта. | 
| 102 | 104 | 
| 103 =back | 105 =back | 
| 104 | 106 | 
| 105 =head1 Cavearts | 107 =head1 Cavearts | 
| 106 | 108 | 
| 107 , C<use parent> , | 109 Нужно заметить, что директива C<use parent> работает не совсем прозрачно, если в нашем примере | 
| 108 C<Composite> C<Baz>, C<Foo>, | 110 класс C<Composite> наследуется от C<Baz>, а затем C<Foo>, то наследование от | 
| 109 C<Foo> C<Baz>. :) | 111 C<Foo> не произойдет поскольку он уже имеется в C<Baz>. Вот не задача:) | 
| 110 | 112 | 
| 111 =cut | 113 =cut | 
