{
    "mode": "perldoc",
    "parameter": "Types::TypeTiny",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/Types%3A%3ATypeTiny/json",
    "generated": "2026-06-10T16:28:24Z",
    "sections": {
        "NAME": {
            "content": "Types::TypeTiny - type constraints used internally by Type::Tiny\n",
            "subsections": []
        },
        "STATUS": {
            "content": "This module is covered by the Type-Tiny stability policy.\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "Dogfooding.\n\nThis isn't a real Type::Library-based type library; that would involve too much circularity. But\nit exports some type constraints which, while designed for use within Type::Tiny, may be more\ngenerally useful.\n",
            "subsections": [
                {
                    "name": "Types",
                    "content": "*   StringLike\n\nAccepts strings and objects overloading stringification.\n\n*   HashLike[`a]\n\nAccepts hashrefs and objects overloading hashification.\n\nSince Types::TypeTiny 1.012, may be parameterized with another type constraint like\nHashLike[Int].\n\n*   ArrayLike[`a]\n\nAccepts arrayrefs and objects overloading arrayfication.\n\nSince Types::TypeTiny 1.012, may be parameterized with another type constraint like\nArrayLike[Int].\n\n*   CodeLike\n\nAccepts coderefs and objects overloading codification.\n\n*   TypeTiny\n\nAccepts blessed Type::Tiny objects.\n\n*   ForeignTypeConstraint\n\nAny reference which toTypeTiny recognizes as something that can be coerced to a Type::Tiny\nobject.\n\nYes, the underscore is included.\n"
                },
                {
                    "name": "Coercion Functions",
                    "content": "\"toTypeTiny($constraint)\"\nPromotes (or \"demotes\" if you prefer) a Moose::Meta::TypeConstraint object to a Type::Tiny\nobject.\n\nCan also handle Validation::Class objects. Type constraints built from Validation::Class\nobjects deliberately *ignore* field filters when they do constraint checking (and go to\ngreat lengths to do so); using filters for coercion only. (The behaviour of \"coerce\" if we\ndon't do that is just too weird!)\n\nCan also handle any object providing \"check\" and \"getmessage\" methods. (This includes\nMouse::Meta::TypeConstraint objects.) If the object also provides \"hascoercion\" and\n\"coerce\" methods, these will be used too.\n\nCan also handle coderefs (but not blessed coderefs or objects overloading \"&{}\"). Coderefs\nare expected to return true iff $ passes the constraint. If $ fails the type constraint,\nthey may either return false, or die with a helpful error message.\n"
                },
                {
                    "name": "Methods",
                    "content": "These are implemented so that \"Types::TypeTiny->meta->gettype($foo)\" works, for rough\ncompatibility with a real Type::Library type library.\n\n\"meta\"\n\"typenames\"\n\"gettype($name)\"\n\"hastype($name)\"\n\"coercionnames\"\n\"getcoercion($name)\"\n\"hascoercion($name)\"\n"
                }
            ]
        },
        "BUGS": {
            "content": "Please report any bugs to <https://github.com/tobyink/p5-type-tiny/issues>.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "Type::Tiny.\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": []
        }
    },
    "summary": "Types::TypeTiny - type constraints used internally by Type::Tiny",
    "flags": [],
    "examples": [],
    "see_also": []
}