{
    "mode": "perldoc",
    "parameter": "Error::TypeTiny::Assertion",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/Error%3A%3ATypeTiny%3A%3AAssertion/json",
    "generated": "2026-06-10T16:29:21Z",
    "sections": {
        "NAME": {
            "content": "Error::TypeTiny::Assertion - exception when a value fails a type constraint\n",
            "subsections": []
        },
        "STATUS": {
            "content": "This module is covered by the Type-Tiny stability policy.\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "This exception is thrown when a value fails a type constraint assertion.\n\nThis package inherits from Error::TypeTiny; see that for most documentation. Major differences\nare listed below:\n",
            "subsections": [
                {
                    "name": "Attributes",
                    "content": "\"type\"\nThe type constraint that was checked against. Weakened links are involved, so this may end\nup being \"undef\".\n\n\"value\"\nThe value that was tested.\n\n\"varname\"\nThe name of the variable that was checked, if known. Defaults to '$'.\n\n\"attributename\"\nIf this exception was thrown as the result of an isa check or a failed coercion for a Moo\nattribute, then this will tell you which attribute (if your Moo is new enough).\n\n(Hopefully one day this will support other OO frameworks.)\n\n\"attributestep\"\nIf this exception was thrown as the result of an isa check or a failed coercion for a Moo\nattribute, then this will contain either \"isa check\" or \"coercion\" to indicate which went\nwrong (if your Moo is new enough).\n\n(Hopefully one day this will support other OO frameworks.)\n"
                },
                {
                    "name": "Methods",
                    "content": "\"hastype\", \"hasattributename\", \"hasattributestep\"\nPredicate methods.\n\n\"message\"\nOverridden to add \"varname\" to the message if defined.\n\n\"explain\"\nAttempts to explain why the value did not pass the type constraint. Returns an arrayref of\nstrings providing step-by-step reasoning; or returns undef if no explanation is possible.\n"
                }
            ]
        },
        "BUGS": {
            "content": "Please report any bugs to <https://github.com/tobyink/p5-type-tiny/issues>.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "Error::TypeTiny.\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": "Error::TypeTiny::Assertion - exception when a value fails a type constraint",
    "flags": [],
    "examples": [],
    "see_also": []
}