From: Dave Rolsky Date: Mon, 14 Feb 2011 00:02:29 +0000 (-0600) Subject: More code tweaking for clarity X-Git-Tag: v0.23~17 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2626f89a95baa6d007f3b4302009fb0f80268372;p=gitmo%2FMooseX-ClassAttribute.git More code tweaking for clarity --- diff --git a/lib/MooseX/ClassAttribute/Trait/Role/Composite.pm b/lib/MooseX/ClassAttribute/Trait/Role/Composite.pm index deaef10..dc4a915 100644 --- a/lib/MooseX/ClassAttribute/Trait/Role/Composite.pm +++ b/lib/MooseX/ClassAttribute/Trait/Role/Composite.pm @@ -53,8 +53,10 @@ around apply_params => sub { my $orig = shift; my $self = shift; - my $metarole = Moose::Util::MetaRole::apply_metaroles( - for => $self->$orig(@_), + $self->$orig(@_); + + $self = Moose::Util::MetaRole::apply_metaroles( + for => $self, role_metaroles => { application_to_class => ['MooseX::ClassAttribute::Trait::Application::ToClass'], @@ -63,9 +65,9 @@ around apply_params => sub { }, ); - $metarole->_merge_class_attributes(); + $self->_merge_class_attributes(); - return $metarole; + return $self; }; 1;