From: gfx Date: Sat, 6 Feb 2010 11:27:39 +0000 (+0900) Subject: Use new API for metaroles X-Git-Tag: 0.50~9 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=3d7c6ec96a92be50258d124bdec61fb91bca3830;p=gitmo%2FMouse.git Use new API for metaroles --- diff --git a/lib/Mouse/Exporter.pm b/lib/Mouse/Exporter.pm index 360e84f..e3cb85a 100644 --- a/lib/Mouse/Exporter.pm +++ b/lib/Mouse/Exporter.pm @@ -183,9 +183,11 @@ sub do_import { } @traits; require Mouse::Util::MetaRole; - Mouse::Util::MetaRole::apply_metaclass_roles( - for_class => $into, - metaclass_roles => \@traits, + Mouse::Util::MetaRole::apply_metaroles( + for => $into, + Mouse::Util::is_a_metarole($into->meta) + ? (role_metaroles => { role => \@traits }) + : (class_metaroles => { class => \@traits }), ); } }