{
    "mode": "perldoc",
    "parameter": "Moose::Meta::TypeConstraint::Role",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/Moose%3A%3AMeta%3A%3ATypeConstraint%3A%3ARole/json",
    "generated": "2026-06-10T16:29:54Z",
    "sections": {
        "NAME": {
            "content": "Moose::Meta::TypeConstraint::Role - Role/TypeConstraint parallel hierarchy\n",
            "subsections": []
        },
        "VERSION": {
            "content": "version 2.2200\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "This class represents type constraints for a role.\n",
            "subsections": []
        },
        "INHERITANCE": {
            "content": "\"Moose::Meta::TypeConstraint::Role\" is a subclass of Moose::Meta::TypeConstraint.\n",
            "subsections": []
        },
        "METHODS": {
            "content": "Moose::Meta::TypeConstraint::Role->new(%options)\nThis creates a new role type constraint based on the given %options.\n\nIt takes the same options as its parent, with two exceptions. First, it requires an additional\noption, \"role\", which is name of the constraint's role. Second, it automatically sets the parent\nto the \"Object\" type.\n\nThe constructor also overrides the hand optimized type constraint with one it creates\ninternally.\n\n$constraint->role\nReturns the role name associated with the constraint.\n\n$constraint->parents\nReturns all the type's parent types, corresponding to the roles that its role does.\n\n$constraint->issubtypeof($typenameorobject)\nIf the given type is also a role type, then this checks that the type's role does the other\ntype's role.\n\nOtherwise it falls back to the implementation in Moose::Meta::TypeConstraint.\n\n$constraint->createchildtype(%options)\nThis returns a new Moose::Meta::TypeConstraint object with the type as its parent.\n\nNote that it does *not* return a \"Moose::Meta::TypeConstraint::Role\" object!\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::TypeConstraint::Role - Role/TypeConstraint parallel hierarchy",
    "flags": [],
    "examples": [],
    "see_also": []
}