class_of for Destructor.. I wonder if this is even right
Shawn M Moore [Sat, 28 Mar 2009 20:39:17 +0000 (16:39 -0400)]
lib/Moose/Meta/Method/Destructor.pm

index 3b24f9e..71eee9b 100644 (file)
@@ -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 {