From: Shawn M Moore Date: Sat, 28 Mar 2009 20:39:17 +0000 (-0400) Subject: class_of for Destructor.. I wonder if this is even right X-Git-Tag: 0.73_01~36^2~25 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=cbf9d1a191a7c6a6ae70f12408028b479c5b404d;p=gitmo%2FMoose.git class_of for Destructor.. I wonder if this is even right --- diff --git a/lib/Moose/Meta/Method/Destructor.pm b/lib/Moose/Meta/Method/Destructor.pm index 3b24f9e..71eee9b 100644 --- a/lib/Moose/Meta/Method/Destructor.pm +++ b/lib/Moose/Meta/Method/Destructor.pm @@ -57,7 +57,7 @@ sub is_needed { || $self->throw_error( "The is_needed method expected a metaclass object as its arugment"); - return $metaclass->meta->can('DEMOLISH'); + return Class::MOP::class_of($metaclass)->can('DEMOLISH'); } sub initialize_body {