MooseX::MethodAttributes::Role::Meta::Role - metarole role for storing code attributes
version 0.14_01
package MyRole; use Moose::Role -traits => 'MethodAttributes'; sub foo : Bar Baz('corge') { ... } package MyClass use Moose; with 'MyRole'; my $attrs = MyClass->meta->get_method('foo')->attributes; # ["Bar", "Baz('corge')"]
This module allows you to add code attributes to methods in Moose roles.
These attributes can then be found later once the methods are composed into a class.
Florian Ragwitz <rafl@debian.org> Tomas Doran <bobtfish@bobtfish.net>
This software is copyright (c) 2009 by Florian Ragwitz.
This is free software; you can redistribute it and/or modify it under the same terms as perl itself.
Currently roles with attributes cannot have methods excluded or aliased, and will in turn confer this property onto any roles they are composed onto.
Composing multiple roles with attributes onto a class at once will fail to work as expected, therefore conflict resolution cannot be taken advantage of.
To install MooseX::MethodAttributes, copy and paste the appropriate command in to your terminal.
cpanm
cpanm MooseX::MethodAttributes
CPAN shell
perl -MCPAN -e shell install MooseX::MethodAttributes
For more information on module installation, please visit the detailed CPAN module installation guide.