Using find_method_by_name, not find_next_method_by_name. This makes
Dave Rolsky [Mon, 6 Apr 2009 17:08:27 +0000 (12:08 -0500)]
sure we inline properly for classes that have their own DEMOLISH

lib/Moose/Meta/Method/Destructor.pm

index 93d7f83..9d9e1a3 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->find_next_method_by_name('DEMOLISH');
+    return $metaclass->find_method_by_name('DEMOLISH');
 }
 
 sub initialize_body {