{
    "content": [
        {
            "type": "text",
            "text": "# Type::Parser (perldoc)\n\n## NAME\n\nType::Parser - parse type constraint strings\n\n## SYNOPSIS\n\nuse v5.10;\nuse strict;\nuse warnings;\nuse Type::Parser qw( evaltype );\nuse Type::Registry;\nmy $reg = Type::Registry->forme;\n$reg->addtypes(\"Types::Standard\");\nmy $type = evaltype(\"Int | ArrayRef[Int]\", $reg);\n$type->check(10);        # true\n$type->check([1..4]);    # true\n$type->check({foo=>1});  # false\n\n## DESCRIPTION\n\nGenerally speaking, you probably don't want to be using this module directly. Instead use the\n\"lookup\" method from Type::Registry which wraps it.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **STATUS**\n- **DESCRIPTION** (2 subsections)\n- **BUGS**\n- **SEE ALSO**\n- **AUTHOR**\n- **COPYRIGHT AND LICENCE**\n- **DISCLAIMER OF WARRANTIES**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "Type::Parser",
        "section": "",
        "mode": "perldoc",
        "summary": "Type::Parser - parse type constraint strings",
        "synopsis": "use v5.10;\nuse strict;\nuse warnings;\nuse Type::Parser qw( evaltype );\nuse Type::Registry;\nmy $reg = Type::Registry->forme;\n$reg->addtypes(\"Types::Standard\");\nmy $type = evaltype(\"Int | ArrayRef[Int]\", $reg);\n$type->check(10);        # true\n$type->check([1..4]);    # true\n$type->check({foo=>1});  # false",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 16,
                "subsections": []
            },
            {
                "name": "STATUS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 3,
                "subsections": [
                    {
                        "name": "Functions",
                        "lines": 15
                    },
                    {
                        "name": "Constants",
                        "lines": 18
                    }
                ]
            },
            {
                "name": "BUGS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "COPYRIGHT AND LICENCE",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "DISCLAIMER OF WARRANTIES",
                "lines": 4,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "Type::Parser - parse type constraint strings\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "use v5.10;\nuse strict;\nuse warnings;\n\nuse Type::Parser qw( evaltype );\nuse Type::Registry;\n\nmy $reg = Type::Registry->forme;\n$reg->addtypes(\"Types::Standard\");\n\nmy $type = evaltype(\"Int | ArrayRef[Int]\", $reg);\n\n$type->check(10);        # true\n$type->check([1..4]);    # true\n$type->check({foo=>1});  # false\n",
                "subsections": []
            },
            "STATUS": {
                "content": "This module is covered by the Type-Tiny stability policy.\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "Generally speaking, you probably don't want to be using this module directly. Instead use the\n\"lookup\" method from Type::Registry which wraps it.\n",
                "subsections": [
                    {
                        "name": "Functions",
                        "content": "\"parse($string)\"\nParse the type constraint string into something like an AST.\n\nIf called in list context, also returns any \"tail\" found on the original string.\n\n\"extracttype($string, $registry)\"\nCompile a type constraint string into a Type::Tiny object.\n\nIf called in list context, also returns any \"tail\" found on the original string.\n\n\"evaltype($string, $registry)\"\nCompile a type constraint string into a Type::Tiny object.\n\nThrows an error if the \"tail\" contains any non-whitespace character.\n"
                    },
                    {
                        "name": "Constants",
                        "content": "The following constants correspond to values returned by \"$token->type\".\n\n\"TYPE\"\n\"QUOTELIKE\"\n\"STRING\"\n\"HEXNUM\"\n\"CLASS\"\n\"LBRACKET\"\n\"RBRACKET\"\n\"COMMA\"\n\"SLURPY\"\n\"UNION\"\n\"INTERSECT\"\n\"NOT\"\n\"LPAREN\"\n\"RPAREN\"\n\"MYSTERY\"\n"
                    }
                ]
            },
            "BUGS": {
                "content": "Please report any bugs to <https://github.com/tobyink/p5-type-tiny/issues>.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "Type::Registry.\n",
                "subsections": []
            },
            "AUTHOR": {
                "content": "Toby Inkster <tobyink@cpan.org>.\n",
                "subsections": []
            },
            "COPYRIGHT AND LICENCE": {
                "content": "This software is copyright (c) 2013-2014, 2017-2021 by Toby Inkster.\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": []
            },
            "DISCLAIMER OF WARRANTIES": {
                "content": "THIS PACKAGE IS PROVIDED \"AS IS\" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,\nWITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR\nPURPOSE.\n",
                "subsections": []
            }
        }
    }
}