From: Jesse Luehrs Date: Thu, 3 Sep 2009 04:14:40 +0000 (-0500) Subject: use the current metaclass's throw_error rather than Moose's X-Git-Tag: 0.89_02~44 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=9f0bc5ec65936aa3bb6afda58c93ce48a065f7da;p=gitmo%2FMoose.git use the current metaclass's throw_error rather than Moose's --- diff --git a/lib/Moose/Meta/Class.pm b/lib/Moose/Meta/Class.pm index 642a75e..c1b2053 100644 --- a/lib/Moose/Meta/Class.pm +++ b/lib/Moose/Meta/Class.pm @@ -233,7 +233,7 @@ sub superclasses { foreach my $super (@supers) { Class::MOP::load_class($super); my $meta = Class::MOP::class_of($super); - Moose->throw_error("You cannot inherit from a Moose Role ($super)") + $self->throw_error("You cannot inherit from a Moose Role ($super)") if $meta && $meta->isa('Moose::Meta::Role') } return $self->SUPER::superclasses(@supers);