{
    "mode": "perldoc",
    "parameter": "Moose::Meta::Role::Attribute",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/Moose%3A%3AMeta%3A%3ARole%3A%3AAttribute/json",
    "generated": "2026-06-11T13:36:04Z",
    "sections": {
        "NAME": {
            "content": "Moose::Meta::Role::Attribute - The Moose attribute metaclass for Roles\n",
            "subsections": []
        },
        "VERSION": {
            "content": "version 2.2200\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "This class implements the API for attributes in roles. Attributes in roles are more like\nattribute prototypes than full blown attributes. While they are introspectable, they have very\nlittle behavior.\n",
            "subsections": []
        },
        "METHODS": {
            "content": "Moose::Meta::Role::Attribute->new(...)\nThis method accepts all the options that would be passed to the constructor for\nMoose::Meta::Attribute.\n\n$attr->metaclass\n$attr->is\nReturns the option as passed to the constructor.\n\n$attr->associatedrole\nReturns the Moose::Meta::Role to which this attribute belongs, if any.\n\n$attr->originalrole\nReturns the Moose::Meta::Role in which this attribute was first defined. This may not be the\nsame as the value of \"associatedrole()\" for attributes in a composite role, or when one role\nconsumes other roles.\n\n$attr->originaloptions\nReturns a hash reference of options passed to the constructor. This is used when creating a\nMoose::Meta::Attribute object from this object.\n\n$attr->attachtorole($role)\nAttaches the attribute to the given Moose::Meta::Role.\n\n$attr->attributeforclass($metaclass)\nGiven an attribute metaclass name, this method calls \"$metaclass->interpolateclassandnew\" to\nconstruct an attribute object which can be added to a Moose::Meta::Class.\n\n$attr->clone\nCreates a new object identical to the object on which the method is called.\n\n$attr->issameas($otherattr)\nCompares two role attributes and returns true if they are identical.\n\nIn addition, this class implements all informational predicates implements by\nMoose::Meta::Attribute (and Class::MOP::Attribute).\n",
            "subsections": []
        },
        "BUGS": {
            "content": "See \"BUGS\" in Moose for details on reporting bugs.\n",
            "subsections": []
        },
        "AUTHORS": {
            "content": "*   Stevan Little <stevan@cpan.org>\n\n*   Dave Rolsky <autarch@urth.org>\n\n*   Jesse Luehrs <doy@cpan.org>\n\n*   Shawn M Moore <sartak@cpan.org>\n\n*   יובל קוג'מן (Yuval Kogman) <nothingmuch@woobling.org>\n\n*   Karen Etheridge <ether@cpan.org>\n\n*   Florian Ragwitz <rafl@debian.org>\n\n*   Hans Dieter Pearcey <hdp@cpan.org>\n\n*   Chris Prather <chris@prather.org>\n\n*   Matt S Trout <mstrout@cpan.org>\n",
            "subsections": []
        },
        "COPYRIGHT AND LICENSE": {
            "content": "This software is copyright (c) 2006 by Infinity Interactive, Inc.\n\nThis is free software; you can redistribute it and/or modify it under the same terms as the Perl\n5 programming language system itself.\n",
            "subsections": []
        }
    },
    "summary": "Moose::Meta::Role::Attribute - The Moose attribute metaclass for Roles",
    "flags": [],
    "examples": [],
    "see_also": []
}