diff lib/IMPL/Object/Accessor.pm @ 407:c6e90e02dd17 ref20150831

renamed Lib->lib
author cin
date Fri, 04 Sep 2015 19:40:23 +0300
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lib/IMPL/Object/Accessor.pm	Fri Sep 04 19:40:23 2015 +0300
@@ -0,0 +1,26 @@
+package IMPL::Object::Accessor;
+use strict;
+
+use parent qw(
+    IMPL::Object::Abstract
+    Class::Accessor
+);
+
+use IMPL::require {
+    ClassPropertyImplementor => '-IMPL::Code::AccessorPropertyImplementor'
+};
+
+require IMPL::Code::AccessorPropertyImplementor;
+
+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;