Created
June 15, 2009 13:00
-
-
Save omega/130095 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/lib/Class/MOP/Class.pm b/lib/Class/MOP/Class.pm | |
| index 237023b..4d0c77a 100644 | |
| --- a/lib/Class/MOP/Class.pm | |
| +++ b/lib/Class/MOP/Class.pm | |
| @@ -649,7 +649,8 @@ 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' was not found in the inheritance hierarchy for " . $self->name; | |
| + || confess "The method '$method_name' was not found in the inheritance hierarchy (" | |
| + . join(" -> ", $self->linearized_isa) . ") for " . $self->name; | |
| # and now make sure to wrap it | |
| # even if it is already wrapped | |
| # because we need a new sub ref | |
| diff --git a/t/017_add_method_modifier.t b/t/017_add_method_modifier.t | |
| index 37ecf5c..09c619d 100644 | |
| --- a/t/017_add_method_modifier.t | |
| +++ b/t/017_add_method_modifier.t | |
| @@ -70,7 +70,7 @@ use Class::MOP; | |
| CheckingAccount->meta->add_before_method_modifier( | |
| 'does_not_exist' => sub { } ); | |
| }, | |
| - qr/\QThe method 'does_not_exist' was not found in the inheritance hierarchy for CheckingAccount/ | |
| + qr/\QThe method 'does_not_exist' was not found in the inheritance hierarchy (CheckingAccount -> BankAccount) for CheckingAccount/ | |
| ); | |
| ::ok( CheckingAccount->meta->has_method('withdraw'), |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment