{
    "mode": "info",
    "parameter": "Moose::Meta::TypeCoercion",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/info/Moose%3A%3AMeta%3A%3ATypeCoercion/json",
    "generated": "2026-07-05T09:28:02Z",
    "sections": {
        "Moose::Meta::TypeCoercUser3Contributed Perl DocuMoose::Meta::TypeCoercion(3pm)": {
            "content": "",
            "subsections": []
        },
        "NAME": {
            "content": "Moose::Meta::TypeCoercion - The Moose Type Coercion metaclass\n",
            "subsections": []
        },
        "VERSION": {
            "content": "version 2.2200\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "A type coercion object is basically a mapping of one or more type\nconstraints and the associated coercions subroutines.\n\nIt's unlikely that you will need to instantiate an object of this class\ndirectly, as it's part of the deep internals of Moose.\n",
            "subsections": []
        },
        "METHODS": {
            "content": "Moose::Meta::TypeCoercion->new(%options)\nCreates a new type coercion object, based on the options provided.\n\no   typeconstraint\n\nThis is the Moose::Meta::TypeConstraint object for the type that is\nbeing coerced to.\n\n$coercion->typecoercionmap\nThis returns the map of type constraints to coercions as an array\nreference. The values of the array alternate between type names and\nsubroutine references which implement the coercion.\n\nThe value is an array reference because coercions are tried in the\norder they are added.\n\n$coercion->typeconstraint\nThis returns the Moose::Meta::TypeConstraint that was passed to the\nconstructor.\n\n$coercion->hascoercionfortype($typename)\nReturns true if the coercion can coerce the named type.\n\n$coercion->addtypecoercions( $typename => $sub, ... )\nThis method takes a list of type names and subroutine references. If\nthe coercion already has a mapping for a given type, it throws an\nexception.\n\nCoercions are actually\n\n$coercion->coerce($value)\nThis method takes a value and applies the first valid coercion it\nfinds.\n\nThis means that if the value could belong to more than type in the\ncoercion object, the first coercion added is used.\n\nMoose::Meta::TypeCoercion->meta\nThis will return a Class::MOP::Class instance for this class.\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-02-06    Moose::Meta::TypeCoercion(3pm)",
            "subsections": []
        }
    },
    "summary": "Moose::Meta::TypeCoercion - The Moose Type Coercion metaclass",
    "flags": [],
    "examples": [],
    "see_also": []
}