{
    "mode": "perldoc",
    "parameter": "TAP::Object",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/TAP%3A%3AObject/json",
    "generated": "2026-06-09T20:33:36Z",
    "synopsis": "package TAP::Whatever;\nuse strict;\nuse base 'TAP::Object';\n# new() implementation by TAP::Object\nsub initialize {\nmy ( $self, @args) = @;\n# initialize your object\nreturn $self;\n}\n# ... later ...\nmy $obj = TAP::Whatever->new(@args);",
    "sections": {
        "NAME": {
            "content": "TAP::Object - Base class that provides common functionality to all \"TAP::*\" modules\n",
            "subsections": []
        },
        "VERSION": {
            "content": "Version 3.43\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "package TAP::Whatever;\n\nuse strict;\n\nuse base 'TAP::Object';\n\n# new() implementation by TAP::Object\nsub initialize {\nmy ( $self, @args) = @;\n# initialize your object\nreturn $self;\n}\n\n# ... later ...\nmy $obj = TAP::Whatever->new(@args);\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "\"TAP::Object\" provides a default constructor and exception model for all \"TAP::*\" classes.\nExceptions are raised using Carp.\n",
            "subsections": []
        },
        "METHODS": {
            "content": "",
            "subsections": [
                {
                    "name": "Class Methods",
                    "content": "\"new\"\nCreate a new object. Any arguments passed to \"new\" will be passed on to the \"initialize\"\nmethod. Returns a new object.\n"
                },
                {
                    "name": "Instance Methods",
                    "content": "\"initialize\"\nInitializes a new object. This method is a stub by default, you should override it as\nappropriate.\n\n*Note:* \"new\" expects you to return $self or raise an exception. See \"croak\", and Carp.\n\n\"croak\"\nRaise an exception using \"croak\" from Carp, eg:\n\n$self->croak( 'why me?', 'aaarrgh!' );\n\nMay also be called as a *class* method.\n\n$class->croak( 'this works too' );\n\n\"confess\"\nRaise an exception using \"confess\" from Carp, eg:\n\n$self->confess( 'why me?', 'aaarrgh!' );\n\nMay also be called as a *class* method.\n\n$class->confess( 'this works too' );\n\n\"construct\"\nCreate a new instance of the specified class.\n\n\"mkmethods\"\nCreate simple getter/setters.\n\nPACKAGE->mkmethods(@methodnames);\n"
                }
            ]
        }
    },
    "summary": "TAP::Object - Base class that provides common functionality to all \"TAP::*\" modules",
    "flags": [],
    "examples": [],
    "see_also": []
}