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

Создан репозитарий
author Sergey
date Tue, 14 Jul 2009 12:54:37 +0400
parents
children e59f44f75f20
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Lib/IMPL/Object/Accessor.pm	Tue Jul 14 12:54:37 2009 +0400
@@ -0,0 +1,15 @@
+package IMPL::Object::Accessor;
+use strict;
+use base qw(IMPL::Object Class::Accessor IMPL::Class::Meta);
+
+sub new {
+    my $class = shift;
+    my $self = $class->Class::Accessor::new( @_ == 1 && ref $_[0] && UNIVERSAL::isa($_[0],'HASH') ? $_[0] : ());
+    $self->callCTOR(@_);
+    return $self;
+}
+
+sub surrogate {
+    $_[0]->Class::Accessor::new;
+}
+1;