X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMoose%2FObject.pm;h=2117e0e95abb620b714f4cc268ace9f4f5a2dcc7;hb=6bf30233976676ca157c80174a7e73f0561dca4c;hp=3639c561f42ea7103305c7557134ec861fc551b4;hpb=e522431d8d7dfeffe645a28a045fa85fae03c8f0;p=gitmo%2FMoose.git diff --git a/lib/Moose/Object.pm b/lib/Moose/Object.pm index 3639c56..2117e0e 100644 --- a/lib/Moose/Object.pm +++ b/lib/Moose/Object.pm @@ -3,16 +3,14 @@ package Moose::Object; use strict; use warnings; - use metaclass 'Moose::Meta::Class' => ( ':attribute_metaclass' => 'Moose::Meta::Attribute' ); -our $VERSION = '0.01'; +our $VERSION = '0.02'; sub new { - my $class = shift; - my %params = @_; + my ($class, %params) = @_; my $self = $class->meta->new_object(%params); $self->BUILDALL(%params); return $self; @@ -21,14 +19,14 @@ sub new { sub BUILDALL { my ($self, %params) = @_; foreach my $method ($self->meta->find_all_methods_by_name('BUILD')) { - $method->{method}->($self, %params); + $method->{code}->($self, %params); } } sub DEMOLISHALL { my $self = shift; foreach my $method ($self->meta->find_all_methods_by_name('DEMOLISH')) { - $method->{method}->($self); + $method->{code}->($self); } } @@ -66,6 +64,8 @@ This will call every C method in the inheritance hierarchy. This will call every C method in the inheritance hierarchy. +=item B + =back =head1 BUGS