1MooseX::MethodAttributeUss:e:rRoCloen:t:rMiebMtuoato:es:deRXoP:le:erM(le3t)DhoocduAmtetnrtiabtuitoens::Role::Meta::Role(3)
2
3
4

NAME

6       MooseX::MethodAttributes::Role::Meta::Role - metarole role for storing
7       code attributes
8

SYNOPSIS

10           package MyRole;
11           use MooseX::MethodAttributes::Role;
12
13           sub foo : Bar Baz('corge') { ... }
14
15           package MyClass
16           use Moose;
17
18           with 'MyRole';
19
20           my $attrs = MyClass->meta->get_method('foo')->attributes; # ["Bar", "Baz('corge')"]
21

DESCRIPTION

23       This module is a metaclass role which is applied by
24       MooseX::MethodAttributes::Role, allowing you to add code attributes to
25       methods in Moose roles.
26
27       These attributes can then be found by introspecting the role metaclass,
28       and are automatically copied into any classes or roles that the role is
29       composed onto.
30

METHODS

32   initialize
33       Ensures that the package containing the role methods does the
34       MooseX::MethodAttributes::Role::AttrContainer role during
35       initialisation, which in turn is responsible for capturing the method
36       attributes on the class and registering them with the metaclass.
37
38   method_metaclass
39       Wraps the normal method and ensures that the method metaclass performs
40       the MooseX::MethodAttributes::Role::Meta::Method role, which allows you
41       to introspect the attributes from the method objects returned by the
42       MOP when querying the metaclass.
43

CAVEATS

45       ·   Currently roles with attributes cannot have methods excluded or
46           aliased, and will in turn confer this property onto any roles they
47           are composed onto.
48

AUTHORS

50       ·   Florian Ragwitz <rafl@debian.org>
51
52       ·   Tomas Doran <bobtfish@bobtfish.net>
53
55       This software is copyright (c) 2010 by Florian Ragwitz.
56
57       This is free software; you can redistribute it and/or modify it under
58       the same terms as the Perl 5 programming language system itself.
59
60
61
62perl v5.12.1                     M2o0o1s0e-X0:7:-M1e9thodAttributes::Role::Meta::Role(3)
Impressum