don't load_class if a metaclass already exists
authorJesse Luehrs <doy@tozt.net>
Mon, 20 Jun 2011 13:19:45 +0000 (08:19 -0500)
committerJesse Luehrs <doy@tozt.net>
Mon, 20 Jun 2011 13:29:48 +0000 (08:29 -0500)
commit8c3531f6c745d07e7c6ea969777fc5df8bd82212
tree7b529a591fb518f18355a726b9035572a02ee0c5
parent4ba8c8a587276faa04603635f901108b88b6d49f
don't load_class if a metaclass already exists

otherwise this breaks things like:

package Foo;
use MooseX::Thing;
...

when MooseX::Thing both applies roles and re-exports Moose::Role stuff,
because at the time that MooseX::Thing::init_meta is called, the package
is empty (it won't get anything in it until Moose::Role::init_meta is
called).
lib/Moose/Util.pm