Make the error message for an unfound method (that is being wrapped) a little clearer.
Dave Rolsky [Fri, 20 Feb 2009 18:22:35 +0000 (18:22 +0000)]
lib/Class/MOP/Class.pm

index 7b4057c..cfc27f4 100644 (file)
@@ -676,7 +676,7 @@ sub add_method {
             $method = $self->find_next_method_by_name($method_name);
             # die if it does not exist
             (defined $method)
-                || confess "The method '$method_name' is not found in the inheritance hierarchy for class " . $self->name;
+                || confess "The method '$method_name' was not found in the inheritance hierarchy for " . $self->name;
             # and now make sure to wrap it
             # even if it is already wrapped
             # because we need a new sub ref