From: Jesse Luehrs Date: Sun, 19 Jun 2011 06:27:03 +0000 (-0500) Subject: make sure the applicant is loaded first X-Git-Tag: 2.0103~23 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=18d77fc74297f8ee266e4e024b1f53c9f705aedc;p=gitmo%2FMoose.git make sure the applicant is loaded first --- diff --git a/lib/Moose/Util.pm b/lib/Moose/Util.pm index c62701d..fb2a409 100644 --- a/lib/Moose/Util.pm +++ b/lib/Moose/Util.pm @@ -137,6 +137,7 @@ sub _apply_all_roles { return unless @role_metas; + Class::MOP::load_class($applicant) unless blessed($applicant); my $meta = ( blessed $applicant ? $applicant : Moose::Meta::Class->initialize($applicant) ); if ( scalar @role_metas == 1 ) {