annotate Lib/IMPL/Object/Accessor.pm @ 0:03e58a454b20

Создан репозитарий
author Sergey
date Tue, 14 Jul 2009 12:54:37 +0400
parents
children e59f44f75f20
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
03e58a454b20 Создан репозитарий
Sergey
parents:
diff changeset
1 package IMPL::Object::Accessor;
03e58a454b20 Создан репозитарий
Sergey
parents:
diff changeset
2 use strict;
03e58a454b20 Создан репозитарий
Sergey
parents:
diff changeset
3 use base qw(IMPL::Object Class::Accessor IMPL::Class::Meta);
03e58a454b20 Создан репозитарий
Sergey
parents:
diff changeset
4
03e58a454b20 Создан репозитарий
Sergey
parents:
diff changeset
5 sub new {
03e58a454b20 Создан репозитарий
Sergey
parents:
diff changeset
6 my $class = shift;
03e58a454b20 Создан репозитарий
Sergey
parents:
diff changeset
7 my $self = $class->Class::Accessor::new( @_ == 1 && ref $_[0] && UNIVERSAL::isa($_[0],'HASH') ? $_[0] : ());
03e58a454b20 Создан репозитарий
Sergey
parents:
diff changeset
8 $self->callCTOR(@_);
03e58a454b20 Создан репозитарий
Sergey
parents:
diff changeset
9 return $self;
03e58a454b20 Создан репозитарий
Sergey
parents:
diff changeset
10 }
03e58a454b20 Создан репозитарий
Sergey
parents:
diff changeset
11
03e58a454b20 Создан репозитарий
Sergey
parents:
diff changeset
12 sub surrogate {
03e58a454b20 Создан репозитарий
Sergey
parents:
diff changeset
13 $_[0]->Class::Accessor::new;
03e58a454b20 Создан репозитарий
Sergey
parents:
diff changeset
14 }
03e58a454b20 Создан репозитарий
Sergey
parents:
diff changeset
15 1;