{
    "content": [
        {
            "type": "text",
            "text": "# Class::Inner (perldoc)\n\n## NAME\n\nClass::Inner - A perlish implementation of Java like inner classes\n\n## SYNOPSIS\n\nuse Class::Inner;\nmy $object = Class::Inner->new(\nparent => 'ParentClass',\nmethods => { method => sub { ... } }, },\nconstructor => 'new',\nargs => [@constructorargs],\n);\n\n## DESCRIPTION\n\nYet another implementation of an anonymous class with per object overrideable methods, but with\nthe added attraction of sort of working dispatch to the parent class's method.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **AUTHOR**\n- **SEE ALSO**\n- **BUGS**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "Class::Inner",
        "section": "",
        "mode": "perldoc",
        "summary": "Class::Inner - A perlish implementation of Java like inner classes",
        "synopsis": "use Class::Inner;\nmy $object = Class::Inner->new(\nparent => 'ParentClass',\nmethods => { method => sub { ... } }, },\nconstructor => 'new',\nargs => [@constructorargs],\n);",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 9,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 51,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 11,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "BUGS",
                "lines": 3,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "Class::Inner - A perlish implementation of Java like inner classes\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "use Class::Inner;\n\nmy $object = Class::Inner->new(\nparent => 'ParentClass',\nmethods => { method => sub { ... } }, },\nconstructor => 'new',\nargs => [@constructorargs],\n);\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "Yet another implementation of an anonymous class with per object overrideable methods, but with\nthe added attraction of sort of working dispatch to the parent class's method.\n\nMETHODS\nnew HASH\nTakes a hash like argument list with the following keys.\n\nparent\nThe name of the parent class. Note that you can only get single inheritance with this or\nSUPER won't work.\n\nmethods\nA hash, keys are method names, values are CODEREFs.\n\nconstructor\nThe name of the constructor method. Defaults to 'new'.\n\nargs\nAn anonymous array of arguments to pass to the constructor. Defaults to an empty list.\n\nReturns an object in an 'anonymous' class which inherits from the parent class. This\nanonymous class has a couple of 'extra' methods:\n\nSUPER\nIf you were to pass something like\n\n$obj = Class::Inner->new(\nparent  => 'Parent',\nmethods => { method =>  sub { ...; $self->SUPER::method(@) } },\n);\n\nthen \"$self-\"gt\"SUPER::method\" almost certainly wouldn't do what you expect, so we\nprovide the \"SUPER\" method which dispatches to the parent implementation of the current\nmethod. There seems to be no good way of getting the full \"SUPER::\" functionality, but\nI'm working on it.\n\nDESTROY\nBecause Class::Inner works by creating a whole new class name for your object, it could\npotentially leak memory if you create a lot of them. So we add a \"DESTROY\" method that\nremoves the class from the symbol table once it's finished with.\n\nIf you need to override a parent's DESTROY method, adding a call to\n\"Class::Inner::cleansymboltable(ref $self)\" to it. Do it at the end of the method or\nyour other method calls won't work.\n\ncleansymboltable\nThe helper subroutine that DESTROY uses to remove the class from the symbol table.\n\nnewclassname\nReturns a name for the next anonymous class.\n",
                "subsections": []
            },
            "AUTHOR": {
                "content": "Maintained by Arun Prasaad \"<arunbear@cpan.org>\"\n\nCopyright (c) 2001 by Piers Cawley <pdcawley@iterative-software.com>.\n\nAll rights reserved. This program is free software; you can redistribute it and/or modify it\nunder the same terms as perl itself.\n\nThanks to the Iterative Software people: Leon Brocard, Natalie Ford and Dave Cross. Also, this\nmodule was written initially for use in the PerlUnit project, AKA Test::Unit. Kudos to Christian\nLemburg and the rest of that team.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "There are a million and one differen Class constructors available on CPAN, none of them does\nquite what I want, so I wrote this one to add to that population where hopefully it will live\nand thrive.\n",
                "subsections": []
            },
            "BUGS": {
                "content": "Bound to be some. Actually the \"SUPER\" method is a workaround for what I consider to be a bug in\nperl.\n",
                "subsections": []
            }
        }
    }
}