From: Dave Rolsky Date: Wed, 14 Jul 2010 20:15:54 +0000 (-0500) Subject: Modernize metarole usage X-Git-Tag: v0.14~7 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7ce5e557d1342ff638b7f59693b2cc6e385dd6f2;p=gitmo%2FMooseX-ClassAttribute.git Modernize metarole usage --- diff --git a/lib/MooseX/ClassAttribute.pm b/lib/MooseX/ClassAttribute.pm index 6cb6b25..b73e6b7 100644 --- a/lib/MooseX/ClassAttribute.pm +++ b/lib/MooseX/ClassAttribute.pm @@ -13,26 +13,19 @@ use MooseX::ClassAttribute::Trait::Role; use MooseX::ClassAttribute::Trait::Application::ToClass; use MooseX::ClassAttribute::Trait::Application::ToRole; -Moose::Exporter->setup_import_methods( with_meta => ['class_has'] ); - -sub init_meta { - shift; - my %p = @_; - - return Moose::Util::MetaRole::apply_metaclass_roles( - for => $p{for_class}, - class_metaroles => { - class => ['MooseX::ClassAttribute::Trait::Class'], - }, - role_metaroles => { - role => ['MooseX::ClassAttribute::Trait::Role'], - application_to_class => - ['MooseX::ClassAttribute::Trait::Application::ToClass'], - application_to_role => - ['MooseX::ClassAttribute::Trait::Application::ToRole'], - }, - ); -} +Moose::Exporter->setup_import_methods( + with_meta => ['class_has'], + class_metaroles => { + class => ['MooseX::ClassAttribute::Trait::Class'], + }, + role_metaroles => { + role => ['MooseX::ClassAttribute::Trait::Role'], + application_to_class => + ['MooseX::ClassAttribute::Trait::Application::ToClass'], + application_to_role => + ['MooseX::ClassAttribute::Trait::Application::ToRole'], + }, +); sub class_has { my $meta = shift;