From: Shawn M Moore Date: Sat, 28 Mar 2009 21:06:27 +0000 (-0400) Subject: class_of for DEMOLISHALL X-Git-Tag: 0.73_01~36^2~12 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=794caf80224c51a80009d0a21926f7e4ddd24142;p=gitmo%2FMoose.git class_of for DEMOLISHALL --- diff --git a/lib/Moose/Object.pm b/lib/Moose/Object.pm index cc80c9c..98b3c46 100644 --- a/lib/Moose/Object.pm +++ b/lib/Moose/Object.pm @@ -51,7 +51,7 @@ sub DEMOLISHALL { # need to do this first, to avoid # extra meta level calls return unless $self->can('DEMOLISH'); - foreach my $method ($self->meta->find_all_methods_by_name('DEMOLISH')) { + foreach my $method (Class::MOP::class_of($self)->find_all_methods_by_name('DEMOLISH')) { $method->{code}->execute($self); } }