From: Shawn M Moore Date: Sat, 28 Mar 2009 21:19:02 +0000 (-0400) Subject: class_of extends X-Git-Tag: 0.73_01~36^2~9 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=192ac103567d6899813597f5a1285f8a8292dd9a;p=gitmo%2FMoose.git class_of extends --- diff --git a/lib/Moose.pm b/lib/Moose.pm index 6990a92..3578db6 100644 --- a/lib/Moose.pm +++ b/lib/Moose.pm @@ -56,11 +56,9 @@ sub extends { my @supers = @_; foreach my $super (@supers) { - Class::MOP::load_class($super); + my $meta = Class::MOP::load_class($super); Moose->throw_error("You cannot inherit from a Moose Role ($super)") - if $super->can('meta') && - blessed $super->meta && - $super->meta->isa('Moose::Meta::Role') + if $meta && $meta->isa('Moose::Meta::Role') }