{
    "content": [
        {
            "type": "text",
            "text": "# HTML::Mason::MethodMaker (perldoc)\n\n## NAME\n\nHTML::Mason::MethodMaker - Used to create simple get & get/set methods in other classes\n\n## SYNOPSIS\n\nuse HTML::Mason::MethodMaker\n( readonly => 'foo',\nreadwrite => [\n[ bar => { type => SCALAR } ],\n[ baz => { isa => 'HTML::Mason::Baz' } ],\n'quux', # no validation\n],\nreadwritecontained => { otherobject =>\n[\n[ 'thing1' => { isa => 'Thing1' } ],\n'thing2', # no validation\n]\n},\n);\n\n## DESCRIPTION\n\nThis automates the creation of simple accessor methods.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **USAGE**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "HTML::Mason::MethodMaker",
        "section": "",
        "mode": "perldoc",
        "summary": "HTML::Mason::MethodMaker - Used to create simple get & get/set methods in other classes",
        "synopsis": "use HTML::Mason::MethodMaker\n( readonly => 'foo',\nreadwrite => [\n[ bar => { type => SCALAR } ],\n[ baz => { isa => 'HTML::Mason::Baz' } ],\n'quux', # no validation\n],\nreadwritecontained => { otherobject =>\n[\n[ 'thing1' => { isa => 'Thing1' } ],\n'thing2', # no validation\n]\n},\n);",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 15,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "USAGE",
                "lines": 24,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "HTML::Mason::MethodMaker - Used to create simple get & get/set methods in other classes\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "use HTML::Mason::MethodMaker\n( readonly => 'foo',\nreadwrite => [\n[ bar => { type => SCALAR } ],\n[ baz => { isa => 'HTML::Mason::Baz' } ],\n'quux', # no validation\n],\nreadwritecontained => { otherobject =>\n[\n[ 'thing1' => { isa => 'Thing1' } ],\n'thing2', # no validation\n]\n},\n);\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "This automates the creation of simple accessor methods.\n",
                "subsections": []
            },
            "USAGE": {
                "content": "This module creates methods when it is \"use\"'d by another module. There are three types of\nmethods: 'readonly', 'readwrite', 'readwritecontained'.\n\nAttributes specified as 'readonly' get an accessor that only returns the value of the\nattribute. Presumably, these attributes are set via more complicated methods in the class or as\na side effect of one of its methods.\n\nAttributes specified as 'readwrite' will take a single optional parameter. If given, this\nparameter will become the new value of the attribute. This value is then returned from the\nmethod. If no parameter is given, then the current value is returned.\n\nIf you want the accessor to use \"Params::Validate\" to validate any values passed to the accessor\n(and you do), then the the accessor specification should be an array reference containing two\nelements. The first element is the accessor name and the second is the validation spec.\n\nThe 'readwritecontained' parameter is used to create accessor for delayed contained objects. A\n*delayed* contained object is one that is not created in the containing object's accessor, but\nrather at some point after the containing object is constructed. For example, the Interpreter\nobject creates Request objects after the Interpreter itself has been created.\n\nThe value of the 'readwritecontained' parameter should be a hash reference. The keys are the\ninternal name of the contained object, such as \"request\" or \"compiler\". The values for the keys\nare the same as the parameters given for 'readwrite' accessors.\n",
                "subsections": []
            }
        }
    }
}