MooseX::MethodAttributes::Role::Meta::Role - metarole role for storing code attributes
version 0.16_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.
Currently roles with attributes cannot have methods excluded or aliased, and will in turn confer this property onto any roles they are composed onto.
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 the Perl 5 programming language system itself.
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.