Moose->throw_error( "Role '"
. $self->name()
. "' has encountered a class attribute conflict "
- . "during composition. This is fatal error and cannot be disambiguated."
+ . "during composition. This is a fatal error and cannot be disambiguated."
);
}
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'],
},
);
- $metarole->_merge_class_attributes();
+ $self->_merge_class_attributes();
- return $metarole;
+ return $self;
};
1;