1Moose::Meta::Role::AttrUisbeurteC(o3n)tributed Perl DocuMmoeonstea:t:iMoenta::Role::Attribute(3)
2
3
4

NAME

6       Moose::Meta::Role::Attribute - The Moose attribute metaclass for Roles
7

VERSION

9       version 2.2206
10

DESCRIPTION

12       This class implements the API for attributes in roles. Attributes in
13       roles are more like attribute prototypes than full blown attributes.
14       While they are introspectable, they have very little behavior.
15

METHODS

17   Moose::Meta::Role::Attribute->new(...)
18       This method accepts all the options that would be passed to the
19       constructor for Moose::Meta::Attribute.
20
21   $attr->metaclass
22   $attr->is
23       Returns the option as passed to the constructor.
24
25   $attr->associated_role
26       Returns the Moose::Meta::Role to which this attribute belongs, if any.
27
28   $attr->original_role
29       Returns the Moose::Meta::Role in which this attribute was first
30       defined. This may not be the same as the value of associated_role() for
31       attributes in a composite role, or when one role consumes other roles.
32
33   $attr->original_options
34       Returns a hash reference of options passed to the constructor. This is
35       used when creating a Moose::Meta::Attribute object from this object.
36
37   $attr->attach_to_role($role)
38       Attaches the attribute to the given Moose::Meta::Role.
39
40   $attr->attribute_for_class($metaclass)
41       Given an attribute metaclass name, this method calls
42       "$metaclass->interpolate_class_and_new" to construct an attribute
43       object which can be added to a Moose::Meta::Class.
44
45   $attr->clone
46       Creates a new object identical to the object on which the method is
47       called.
48
49   $attr->is_same_as($other_attr)
50       Compares two role attributes and returns true if they are identical.
51
52       In addition, this class implements all informational predicates
53       implements by Moose::Meta::Attribute (and Class::MOP::Attribute).
54

BUGS

56       See "BUGS" in Moose for details on reporting bugs.
57

AUTHORS

59       •   Stevan Little <stevan@cpan.org>
60
61       •   Dave Rolsky <autarch@urth.org>
62
63       •   Jesse Luehrs <doy@cpan.org>
64
65       •   Shawn M Moore <sartak@cpan.org>
66
67       •   יובל קוג'מן (Yuval Kogman) <nothingmuch@woobling.org>
68
69       •   Karen Etheridge <ether@cpan.org>
70
71       •   Florian Ragwitz <rafl@debian.org>
72
73       •   Hans Dieter Pearcey <hdp@cpan.org>
74
75       •   Chris Prather <chris@prather.org>
76
77       •   Matt S Trout <mstrout@cpan.org>
78
80       This software is copyright (c) 2006 by Infinity Interactive, Inc.
81
82       This is free software; you can redistribute it and/or modify it under
83       the same terms as the Perl 5 programming language system itself.
84
85
86
87perl v5.38.0                      2023-07-23   Moose::Meta::Role::Attribute(3)
Impressum