X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMouse.git;a=blobdiff_plain;f=lib%2FMouse%2FMeta%2FAttribute.pm;h=4c248501b1835ca425f0adf52174db5a30231438;hp=dffcb227d903a45e19e950a1d29a361cfb95651f;hb=926290ac173b77f0ff0027dcbd95277c9cc2be54;hpb=3a6833503c4b132d636f048ceecba7ef4fbbc210 diff --git a/lib/Mouse/Meta/Attribute.pm b/lib/Mouse/Meta/Attribute.pm index dffcb22..4c24850 100644 --- a/lib/Mouse/Meta/Attribute.pm +++ b/lib/Mouse/Meta/Attribute.pm @@ -142,11 +142,11 @@ sub new { $args{name} = $name; - my $instance = bless \%args, $class; + my $self = bless \%args, $class; # extra attributes if($class ne __PACKAGE__){ - $class->meta->_initialize_instance($instance,\%args); + $class->meta->_initialize_object($self, \%args); } # XXX: there is no fast way to check attribute validity @@ -156,7 +156,7 @@ sub new { # Carp::cluck("Found unknown argument(s) passed to '$name' attribute constructor in '$class': @bad"); # } - return $instance; + return $self; } # readers