.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Moose::Meta::Role::Attribute 3pm" .TH Moose::Meta::Role::Attribute 3pm 2024-03-07 "perl v5.38.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME Moose::Meta::Role::Attribute \- The Moose attribute metaclass for Roles .SH VERSION .IX Header "VERSION" version 2.2207 .SH DESCRIPTION .IX Header "DESCRIPTION" This class implements the API for attributes in roles. Attributes in roles are more like attribute prototypes than full blown attributes. While they are introspectable, they have very little behavior. .SH METHODS .IX Header "METHODS" .SS Moose::Meta::Role::Attribute\->new(...) .IX Subsection "Moose::Meta::Role::Attribute->new(...)" This method accepts all the options that would be passed to the constructor for Moose::Meta::Attribute. .ie n .SS $attr\->metaclass .el .SS \f(CW$attr\fP\->metaclass .IX Subsection "$attr->metaclass" .ie n .SS $attr\->is .el .SS \f(CW$attr\fP\->is .IX Subsection "$attr->is" Returns the option as passed to the constructor. .ie n .SS $attr\->associated_role .el .SS \f(CW$attr\fP\->associated_role .IX Subsection "$attr->associated_role" Returns the Moose::Meta::Role to which this attribute belongs, if any. .ie n .SS $attr\->original_role .el .SS \f(CW$attr\fP\->original_role .IX Subsection "$attr->original_role" Returns the Moose::Meta::Role in which this attribute was first defined. This may not be the same as the value of \f(CWassociated_role()\fR for attributes in a composite role, or when one role consumes other roles. .ie n .SS $attr\->original_options .el .SS \f(CW$attr\fP\->original_options .IX Subsection "$attr->original_options" Returns a hash reference of options passed to the constructor. This is used when creating a Moose::Meta::Attribute object from this object. .ie n .SS $attr\->attach_to_role($role) .el .SS \f(CW$attr\fP\->attach_to_role($role) .IX Subsection "$attr->attach_to_role($role)" Attaches the attribute to the given Moose::Meta::Role. .ie n .SS $attr\->attribute_for_class($metaclass) .el .SS \f(CW$attr\fP\->attribute_for_class($metaclass) .IX Subsection "$attr->attribute_for_class($metaclass)" Given an attribute metaclass name, this method calls \f(CW\*(C`$metaclass\->interpolate_class_and_new\*(C'\fR to construct an attribute object which can be added to a Moose::Meta::Class. .ie n .SS $attr\->clone .el .SS \f(CW$attr\fP\->clone .IX Subsection "$attr->clone" Creates a new object identical to the object on which the method is called. .ie n .SS $attr\->is_same_as($other_attr) .el .SS \f(CW$attr\fP\->is_same_as($other_attr) .IX Subsection "$attr->is_same_as($other_attr)" Compares two role attributes and returns true if they are identical. .PP In addition, this class implements all informational predicates implements by Moose::Meta::Attribute (and Class::MOP::Attribute). .SH BUGS .IX Header "BUGS" See "BUGS" in Moose for details on reporting bugs. .SH AUTHORS .IX Header "AUTHORS" .IP \(bu 4 Stevan Little .IP \(bu 4 Dave Rolsky .IP \(bu 4 Jesse Luehrs .IP \(bu 4 Shawn M Moore .IP \(bu 4 יובל קוג'מן (Yuval Kogman) .IP \(bu 4 Karen Etheridge .IP \(bu 4 Florian Ragwitz .IP \(bu 4 Hans Dieter Pearcey .IP \(bu 4 Chris Prather .IP \(bu 4 Matt S Trout .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" This software is copyright (c) 2006 by Infinity Interactive, Inc. .PP This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.