From: Shawn M Moore Date: Thu, 4 Jun 2009 05:15:48 +0000 (-0400) Subject: Improve the error message of a role using "extends" X-Git-Tag: 0.80~11 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=887e3bf04c38eafa3475a8a76858e778d7b78469;p=gitmo%2FMoose.git Improve the error message of a role using "extends" --- diff --git a/Changes b/Changes index 8b0e401..ec7a096 100644 --- a/Changes +++ b/Changes @@ -23,6 +23,10 @@ for, noteworthy changes. conflicts generate different, more instructive, errors, resolving Ovid's #44895. (Sartak) + * Moose::Role + - Improve the error message of "extends" as suggested by Adam + Kennedy and confound (Sartak) + * Tests - Update test suite for subname change in Class::MOP (nothingmuch) diff --git a/lib/Moose/Role.pm b/lib/Moose/Role.pm index 5910c98..55a044d 100644 --- a/lib/Moose/Role.pm +++ b/lib/Moose/Role.pm @@ -18,7 +18,7 @@ use Moose::Meta::Role; use Moose::Util::TypeConstraints; sub extends { - croak "Roles do not currently support 'extends'"; + croak "Roles do not support 'extends' (you can use 'with' to specialize a role)"; } sub with {