{
    "mode": "perldoc",
    "parameter": "Specio::Constraint::AnyCan",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/Specio%3A%3AConstraint%3A%3AAnyCan/json",
    "generated": "2026-06-13T06:34:51Z",
    "synopsis": "my $type = Specio::Constraint::AnyCan->new(...);\nprint $, \"\\n\" for @{ $type->methods };",
    "sections": {
        "NAME": {
            "content": "Specio::Constraint::AnyCan - A class for constraints which require a class name or object with a\nset of methods\n",
            "subsections": []
        },
        "VERSION": {
            "content": "version 0.47\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "my $type = Specio::Constraint::AnyCan->new(...);\nprint $, \"\\n\" for @{ $type->methods };\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "This is a specialized type constraint class for types which require a class name or object with\na defined set of methods.\n",
            "subsections": []
        },
        "API": {
            "content": "This class provides all of the same methods as Specio::Constraint::Simple, with a few\ndifferences:\n\nSpecio::Constraint::AnyCan->new( ... )\nThe \"parent\" parameter is ignored if it passed, as it is always set to the \"Defined\" type.\n\nThe \"inlinegenerator\" and \"constraint\" parameters are also ignored. This class provides its own\ndefault inline generator subroutine reference.\n\nThis class overrides the \"messagegenerator\" default if none is provided.\n\nFinally, this class requires an additional parameter, \"methods\". This must be an array reference\nof method names which the constraint requires. You can also pass a single string and it will be\nconverted to an array reference internally.\n\n$anycan->methods\nReturns an array reference containing the methods this constraint requires.\n",
            "subsections": []
        },
        "ROLES": {
            "content": "This class does the Specio::Constraint::Role::IsaType, Specio::Constraint::Role::Interface, and\nSpecio::Role::Inlinable roles.\n",
            "subsections": []
        },
        "SUPPORT": {
            "content": "Bugs may be submitted at <https://github.com/houseabsolute/Specio/issues>.\n\nI am also usually active on IRC as 'autarch' on \"irc://irc.perl.org\".\n",
            "subsections": []
        },
        "SOURCE": {
            "content": "The source code repository for Specio can be found at <https://github.com/houseabsolute/Specio>.\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Dave Rolsky <autarch@urth.org>\n",
            "subsections": []
        },
        "COPYRIGHT AND LICENSE": {
            "content": "This software is Copyright (c) 2012 - 2021 by Dave Rolsky.\n\nThis is free software, licensed under:\n\nThe Artistic License 2.0 (GPL Compatible)\n\nThe full text of the license can be found in the LICENSE file included with this distribution.\n",
            "subsections": []
        }
    },
    "summary": "Specio::Constraint::AnyCan - A class for constraints which require a class name or object with a set of methods",
    "flags": [],
    "examples": [],
    "see_also": []
}