{
    "content": [
        {
            "type": "text",
            "text": "# Moose::Meta::TypeConstraint::Union (info)\n\n## NAME\n\nMoose::Meta::TypeConstraint::Union - A union of Moose type constraints\n\n## DESCRIPTION\n\nThis metaclass represents a union of type constraints. A union takes\nmultiple type constraints, and is true if any one of its member\nconstraints is true.\n\n## Sections\n\n- **Moose::Meta::TypeConstUsertContributed)Moose::Meta::TypeConstraint::Union(3pm)**\n- **NAME**\n- **VERSION**\n- **DESCRIPTION**\n- **INHERITANCE**\n- **METHODS**\n- **BUGS**\n- **AUTHORS**\n- **COPYRIGHT AND LICENSE**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "Moose::Meta::TypeConstraint::Union",
        "section": "",
        "mode": "info",
        "summary": "Moose::Meta::TypeConstraint::Union - A union of Moose type constraints",
        "synopsis": null,
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "Moose::Meta::TypeConstUsertContributed)Moose::Meta::TypeConstraint::Union(3pm)",
                "lines": 1,
                "subsections": []
            },
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "VERSION",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "INHERITANCE",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "METHODS",
                "lines": 53,
                "subsections": []
            },
            {
                "name": "BUGS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "AUTHORS",
                "lines": 20,
                "subsections": []
            },
            {
                "name": "COPYRIGHT AND LICENSE",
                "lines": 6,
                "subsections": []
            }
        ],
        "sections": {
            "Moose::Meta::TypeConstUsertContributed)Moose::Meta::TypeConstraint::Union(3pm)": {
                "content": "",
                "subsections": []
            },
            "NAME": {
                "content": "Moose::Meta::TypeConstraint::Union - A union of Moose type constraints\n",
                "subsections": []
            },
            "VERSION": {
                "content": "version 2.2200\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "This metaclass represents a union of type constraints. A union takes\nmultiple type constraints, and is true if any one of its member\nconstraints is true.\n",
                "subsections": []
            },
            "INHERITANCE": {
                "content": "\"Moose::Meta::TypeConstraint::Union\" is a subclass of\nMoose::Meta::TypeConstraint.\n",
                "subsections": []
            },
            "METHODS": {
                "content": "Moose::Meta::TypeConstraint::Union->new(%options)\nThis creates a new class type constraint based on the given %options.\n\nIt takes the same options as its parent. It also requires an additional\noption, \"typeconstraints\". This is an array reference containing the\nMoose::Meta::TypeConstraint objects that are the members of the union\ntype. The \"name\" option defaults to the names all of these member types\nsorted and then joined by a pipe (|).\n\nThe constructor sets the implementation of the constraint so that is\nsimply calls \"check\" on the newly created object.\n\nFinally, the constructor also makes sure that the object's \"coercion\"\nattribute is a Moose::Meta::TypeCoercion::Union object.\n\n$constraint->typeconstraints\nThis returns the array reference of \"typeconstraints\" provided to the\nconstructor.\n\n$constraint->parent\nThis returns the nearest common ancestor of all the components of the\nunion.\n\n$constraint->check($value)\n$constraint->validate($value)\nThese two methods simply call the relevant method on each of the member\ntype constraints in the union. If any type accepts the value, the value\nis valid.\n\nWith \"validate\" the error message returned includes all of the error\nmessages returned by the member type constraints.\n\n$constraint->equals($typenameorobject)\nA type is considered equal if it is also a union type, and the two\nunions have the same member types.\n\n$constraint->findtypefor($value)\nThis returns the first member type constraint for which \"check($value)\"\nis true, allowing you to determine which of the Union's member type\nconstraints a given value matches.\n\n$constraint->isatypeof($typenameorobject)\nThis returns true if all of the member type constraints return true for\nthe \"isatypeof\" method.\n\n$constraint->issubtypeof\nThis returns true if all of the member type constraints return true for\nthe \"issubtypeof\" method.\n\n$constraint->createchildtype(%options)\nThis returns a new Moose::Meta::TypeConstraint object with the type as\nits parent.\n",
                "subsections": []
            },
            "BUGS": {
                "content": "See \"BUGS\" in Moose for details on reporting bugs.\n",
                "subsections": []
            },
            "AUTHORS": {
                "content": "o   Stevan Little <stevan@cpan.org>\n\no   Dave Rolsky <autarch@urth.org>\n\no   Jesse Luehrs <doy@cpan.org>\n\no   Shawn M Moore <sartak@cpan.org>\n\no    ' (Yuval Kogman) <nothingmuch@woobling.org>\n\no   Karen Etheridge <ether@cpan.org>\n\no   Florian Ragwitz <rafl@debian.org>\n\no   Hans Dieter Pearcey <hdp@cpan.org>\n\no   Chris Prather <chris@prather.org>\n\no   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\nthe same terms as the Perl 5 programming language system itself.\n\nperl v5.34.0                      2022-Moose::Meta::TypeConstraint::Union(3pm)",
                "subsections": []
            }
        }
    }
}