comparison lib/IMPL/Class/Meta.pm @ 411:ee36115f6a34 ref20150831

sync
author cin
date Mon, 21 Sep 2015 00:53:10 +0300
parents c6e90e02dd17
children
comparison
equal deleted inserted replaced
410:9335cf010b23 411:ee36115f6a34
90 90
91 $self = ref $self || $self; 91 $self = ref $self || $self;
92 92
93 if (@_ > 0) { 93 if (@_ > 0) {
94 if ($class ne $self) { 94 if ($class ne $self) {
95 $self->static_accessor_clone( $name => $_[0] ); # define own class data 95 static_accessor_clone($self, $name => $_[0] ); # define own class data
96 } else { 96 } else {
97 $value = $_[0]; 97 $value = $_[0];
98 } 98 }
99 } else { 99 } else {
100 return $self ne $class 100 return $self ne $class
101 ? $self->static_accessor_clone($name => clone($value)) 101 ? static_accessor_clone($self, $name => clone($value))
102 : $value; 102 : $value;
103 } 103 }
104 }; 104 };
105 return $value; 105 return $value;
106 }; 106 };
115 115
116 if (@_ > 0) { 116 if (@_ > 0) {
117 $self = ref $self || $self; 117 $self = ref $self || $self;
118 118
119 if ($class ne $self) { 119 if ($class ne $self) {
120 $self->static_accessor_inherit( $name => $_[0] ); # define own class data 120 static_accessor_inherit($self, $name => $_[0] ); # define own class data
121 } else { 121 } else {
122 $value = $_[0]; 122 $value = $_[0];
123 } 123 }
124 } else { 124 } else {
125 $value ; 125 $value ;
137 my $self = shift; 137 my $self = shift;
138 $self = ref $self || $self; 138 $self = ref $self || $self;
139 139
140 if ($class ne $self) { 140 if ($class ne $self) {
141 if (@_ > 0) { 141 if (@_ > 0) {
142 $self->static_accessor_own( $name => $_[0] ); # define own class data 142 static_accessor_own($self, $name => $_[0] ); # define own class data
143 } else { 143 } else {
144 return; 144 return;
145 } 145 }
146 } else { 146 } else {
147 if ( @_ > 0 ) { 147 if ( @_ > 0 ) {