comparison Lib/IMPL/Object/Accessor.pm @ 278:4ddb27ff4a0b

core refactoring
author cin
date Mon, 04 Feb 2013 02:10:37 +0400
parents 6d8092d8ce1b
children
comparison
equal deleted inserted replaced
277:6585464c4664 278:4ddb27ff4a0b
1 package IMPL::Object::Accessor; 1 package IMPL::Object::Accessor;
2 use strict; 2 use strict;
3 use parent qw(IMPL::Object::Abstract Class::Accessor IMPL::Class::Meta);
4 3
5 require IMPL::Class::Property::Accessor; 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;
6 14
7 sub new { 15 sub new {
8 my $class = shift; 16 my $class = shift;
9 my $self = $class->Class::Accessor::new( @_ == 1 && ref $_[0] && UNIVERSAL::isa($_[0],'HASH') ? $_[0] : ()); 17 my $self = $class->Class::Accessor::new( @_ == 1 && ref $_[0] && UNIVERSAL::isa($_[0],'HASH') ? $_[0] : ());
10 $self->callCTOR(@_); 18 $self->callCTOR(@_);
13 21
14 sub surrogate { 22 sub surrogate {
15 $_[0]->Class::Accessor::new; 23 $_[0]->Class::Accessor::new;
16 } 24 }
17 25
18 __PACKAGE__->static_accessor( propertyInfoClass => 'IMPL::Class::AccessorPropertyInfo' );
19
20 sub _PropertyImplementor {
21 'IMPL::Class::Property::Accessor'
22 }
23
24 1; 26 1;