{
    "content": [
        {
            "type": "text",
            "text": "# Type::Tiny::Manual::UsingWithTestMore (perldoc)\n\n## NAME\n\nType::Tiny::Manual::UsingWithTestMore - Type::Tiny for test suites\n\n## Sections\n\n- **NAME**\n- **MANUAL** (2 subsections)\n- **NEXT STEPS**\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::Tiny::Manual::UsingWithTestMore",
        "section": "",
        "mode": "perldoc",
        "summary": "Type::Tiny::Manual::UsingWithTestMore - Type::Tiny for test suites",
        "synopsis": null,
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "MANUAL",
                "lines": 1,
                "subsections": [
                    {
                        "name": "Test::TypeTiny",
                        "lines": 26
                    },
                    {
                        "name": "Type::Tiny as a Replacement for Test::Deep",
                        "lines": 29
                    }
                ]
            },
            {
                "name": "NEXT STEPS",
                "lines": 7,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "COPYRIGHT AND LICENCE",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "DISCLAIMER OF WARRANTIES",
                "lines": 4,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "Type::Tiny::Manual::UsingWithTestMore - Type::Tiny for test suites\n",
                "subsections": []
            },
            "MANUAL": {
                "content": "",
                "subsections": [
                    {
                        "name": "Test::TypeTiny",
                        "content": "This is a module for testing that types you've defined accept and reject the values you think\nthey should.\n\nshouldpass($value, $type);\nshouldfail($othervalue, $type);\n\nEasy. (But yeah, I always forget whether the type goes first or second!)\n\nThere's also a function to test that subtype/supertype relationships are working okay.\n\noksubtype($type, @subtypes);\n\nOf course you can just check a type like this:\n\nok( $type->check($value) );\n\nBut the advantage of \"shouldpass\" is that if the \"EXTENDEDTESTING\" environment variable is set\nto true, \"shouldpass\" will also perform a strict check on the value, which involves climbing up\nthe type's inheritance tree (its parent, its parent's parent, etc) to make sure the value passes\nall their constraints.\n\nIf a normal check and strict check differ, this is usually a problem in the inlining code\nsomewhere.\n\nSee Test::TypeTiny for more information.\n"
                    },
                    {
                        "name": "Type::Tiny as a Replacement for Test::Deep",
                        "content": "Here's one of the examples from the Test::Deep documentation:\n\nmy $namere = re('^(Mr|Mrs|Miss) \\w+ \\w+$');\ncmpdeeply(\n$person,\n{\nName       => $namere,\nPhone      => re('^0d{6}$'),\nChildNames => arrayeach($namere)\n},\n\"person ok\"\n);\n\nIt's pretty easy to rewrite this to use Types::Standard:\n\nmy $name = StrMatch[ qr/^(Mr|Mrs|Miss) \\w+ \\w+$/ ];\nshouldpass(\n$person,\nDict[\nName         => $name,\nPhone        => StrMatch[ qr/^0d{6}$/ ],\nChildNames   => ArrayRef[$name]\n]\n);\n\nThere's nothing especially wrong with Test::Deep, but if you're already familiar with\nType::Tiny's built-in types and you've maybe written your own type libraries too, it will save\nyou having to switch between using two separate systems of checks.\n"
                    }
                ]
            },
            "NEXT STEPS": {
                "content": "Here's your next step:\n\n*   Type::Tiny::Manual::Params\n\nAdvanced information on Type::Params, and using Type::Tiny with other signature modules like\nFunction::Parameters and Kavorka.\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": []
            }
        }
    }
}