stuff
[gitmo/Moose.git] / lib / Moose / Object.pm
index 3639c56..adf7cc6 100644 (file)
@@ -32,6 +32,15 @@ sub DEMOLISHALL {
        }       
 }
 
+sub NEXT {
+    my $self   = shift;
+    my $method = (caller())[3];
+    my $code   = $self->meta->find_next_method_by_name($method);
+    (defined $code)
+        || confess "Could not find the NEXT method for ($method) in ($self)";
+    return $code->($self, @_);
+}
+
 sub DESTROY { goto &DEMOLISHALL }
 
 1;