From: Shawn M Moore Date: Sat, 29 Nov 2008 01:39:33 +0000 (+0000) Subject: Use the new method->execute API for BUILDALL and DEMOLISHALL X-Git-Tag: 0.62_01~3 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b8f014e76a52afca09607ff1630ba073d220a8bc;p=gitmo%2FMoose.git Use the new method->execute API for BUILDALL and DEMOLISHALL --- diff --git a/Changes b/Changes index 2eaef63..4c94667 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,10 @@ Revision history for Perl extension Moose +0.63 + * Moose::Object + - use the method->execute API for BUILDALL + and DEMOLISHALL (Sartak) + 0.62 Wed November 26, 2008 * Moose::Meta::Role::Application::ToClass Moose::Meta::Role::Application::ToRole diff --git a/lib/Moose/Object.pm b/lib/Moose/Object.pm index 4e967f6..9dfbad4 100644 --- a/lib/Moose/Object.pm +++ b/lib/Moose/Object.pm @@ -43,14 +43,14 @@ sub BUILDALL { return unless $_[0]->can('BUILD'); my ($self, $params) = @_; foreach my $method (reverse $self->meta->find_all_methods_by_name('BUILD')) { - $method->{code}->body->($self, $params); + $method->{code}->execute($self, $params); } } sub DEMOLISHALL { my $self = shift; foreach my $method ($self->meta->find_all_methods_by_name('DEMOLISH')) { - $method->{code}->body->($self); + $method->{code}->execute($self); } }