diff Lib/IMPL/Class/PropertyInfo.pm @ 275:6253872024a4

*refactoring IMPL::Class
author cin
date Thu, 31 Jan 2013 02:18:31 +0400
parents 8d36073411b1
children 4ddb27ff4a0b
line wrap: on
line diff
--- a/Lib/IMPL/Class/PropertyInfo.pm	Wed Jan 30 03:30:28 2013 +0400
+++ b/Lib/IMPL/Class/PropertyInfo.pm	Thu Jan 31 02:18:31 2013 +0400
@@ -5,42 +5,38 @@
 
 our %CTOR = ( 'IMPL::Class::MemberInfo' => '@_' );
 
-__PACKAGE__->mk_accessors(qw(Type Mutators canGet canSet ownerSet isList));
+__PACKAGE__->mk_accessors(qw(type mutators canGet canSet ownerSet isList));
 
 my %LoadedModules;
 
 sub CTOR {
     my $this = shift;
     
-    if ( my $type = $this->Attributes ? delete $this->Attributes->{type} : undef ) {
-        $this->Type($type);
+    if ( my $type = $this->attributes ? delete $this->attributes->{type} : undef ) {
+        $this->type($type);
     }
     
-    $this->Mutators(0) unless defined $this->Mutators;
+    $this->mutators(0) unless defined $this->mutators;
 }
 
-sub Implementor {
+sub implementor {
     my $this = shift;
         
     if (@_) {
-        $this->SUPER::Implementor(@_);
+        $this->SUPER::implementor(@_);
     } else {
-        my $implementor = $this->SUPER::Implementor;
+        my $implementor = $this->SUPER::implementor;
         return $implementor if $implementor;
         
         $implementor = $this->SelectImplementor();
         
-        $this->Implementor($implementor);
+        $this->implementor($implementor);
     }
     
 }
 
 sub SelectImplementor {
-    eval {$_[0]->Class->_PropertyImplementor} or die new IMPL::Exception('Can\'t find a property implementor for the specified class',$_[0]->Class);
-}
-
-sub type {
-    goto &Type;
+    eval {$_[0]->class->_PropertyImplementor} or die new IMPL::Exception('Can\'t find a property implementor for the specified class',$_[0]->Class);
 }
 
 1;