use the current metaclass's throw_error rather than Moose's
Jesse Luehrs [Thu, 3 Sep 2009 04:14:40 +0000 (23:14 -0500)]
lib/Moose/Meta/Class.pm

index 642a75e..c1b2053 100644 (file)
@@ -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);