Mercurial > pub > Impl
comparison lib/IMPL/Object/Accessor.pm @ 407:c6e90e02dd17 ref20150831
renamed Lib->lib
| author | cin |
|---|---|
| date | Fri, 04 Sep 2015 19:40:23 +0300 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| 406:f23fcb19d3c1 | 407:c6e90e02dd17 |
|---|---|
| 1 package IMPL::Object::Accessor; | |
| 2 use strict; | |
| 3 | |
| 4 use parent qw( | |
| 5 IMPL::Object::Abstract | |
| 6 Class::Accessor | |
| 7 ); | |
| 8 | |
| 9 use IMPL::require { | |
| 10 ClassPropertyImplementor => '-IMPL::Code::AccessorPropertyImplementor' | |
| 11 }; | |
| 12 | |
| 13 require IMPL::Code::AccessorPropertyImplementor; | |
| 14 | |
| 15 sub new { | |
| 16 my $class = shift; | |
| 17 my $self = $class->Class::Accessor::new( @_ == 1 && ref $_[0] && UNIVERSAL::isa($_[0],'HASH') ? $_[0] : ()); | |
| 18 $self->callCTOR(@_); | |
| 19 return $self; | |
| 20 } | |
| 21 | |
| 22 sub surrogate { | |
| 23 $_[0]->Class::Accessor::new; | |
| 24 } | |
| 25 | |
| 26 1; |
