From: Yuval Kogman Date: Fri, 9 May 2008 05:14:29 +0000 (+0000) Subject: Avoid overloading in Moose::Object X-Git-Tag: 0_55~190 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ac0824eea01ff70157850ce849303cd3c53054f4;p=gitmo%2FMoose.git Avoid overloading in Moose::Object --- diff --git a/lib/Moose/Object.pm b/lib/Moose/Object.pm index 4b3272e..d018d27 100644 --- a/lib/Moose/Object.pm +++ b/lib/Moose/Object.pm @@ -37,7 +37,7 @@ sub BUILDALL { return unless $_[0]->can('BUILD'); my ($self, $params) = @_; foreach my $method (reverse $self->meta->find_all_methods_by_name('BUILD')) { - $method->{code}->($self, $params); + $method->{code}->body->($self, $params); } } @@ -50,7 +50,7 @@ sub DEMOLISHALL { { local $@; foreach my $method ($self->meta->find_all_methods_by_name('DEMOLISH')) { - $method->{code}->($self); + $method->{code}->body->($self); } } }