Use the new method->execute API for BUILDALL and DEMOLISHALL
Shawn M Moore [Sat, 29 Nov 2008 01:39:33 +0000 (01:39 +0000)]
Changes
lib/Moose/Object.pm

diff --git a/Changes b/Changes
index 2eaef63..4c94667 100644 (file)
--- 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
index 4e967f6..9dfbad4 100644 (file)
@@ -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);
     }
 }