{
    "content": [
        {
            "type": "text",
            "text": "# HTML::Mason::Compiler::ToObject (perldoc)\n\n## NAME\n\nHTML::Mason::Compiler::ToObject - A Compiler subclass that generates Mason object code\n\n## SYNOPSIS\n\nmy $compiler = HTML::Mason::Compiler::ToObject->new;\nmy $objectcode =\n$compiler->compile( compsource => $source,\nname        => $compname,\ncomppath   => $comppath,\n);\n\n## DESCRIPTION\n\nThis Compiler subclass generates Mason object code (Perl code). It is the default Compiler class\nused by Mason.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **ACCESSOR METHODS**\n- **METHODS** (1 subsections)\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "HTML::Mason::Compiler::ToObject",
        "section": "",
        "mode": "perldoc",
        "summary": "HTML::Mason::Compiler::ToObject - A Compiler subclass that generates Mason object code",
        "synopsis": "my $compiler = HTML::Mason::Compiler::ToObject->new;\nmy $objectcode =\n$compiler->compile( compsource => $source,\nname        => $compname,\ncomppath   => $comppath,\n);",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 8,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 52,
                "subsections": []
            },
            {
                "name": "ACCESSOR METHODS",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "METHODS",
                "lines": 3,
                "subsections": [
                    {
                        "name": "compile",
                        "lines": 6
                    }
                ]
            }
        ],
        "sections": {
            "NAME": {
                "content": "HTML::Mason::Compiler::ToObject - A Compiler subclass that generates Mason object code\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "my $compiler = HTML::Mason::Compiler::ToObject->new;\n\nmy $objectcode =\n$compiler->compile( compsource => $source,\nname        => $compname,\ncomppath   => $comppath,\n);\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "This Compiler subclass generates Mason object code (Perl code). It is the default Compiler class\nused by Mason.\n\nPARAMETERS TO THE new() CONSTRUCTOR\nAll of these parameters are optional.\n\ncompclass\nThe class into which component objects are blessed. This defaults to HTML::Mason::Component.\n\nsubcompclass\nThe class into which subcomponent objects are blessed. This defaults to\nHTML::Mason::Component::Subcomponent.\n\ninpackage\nThis is the package in which a component's code is executed. For historical reasons, this\ndefaults to \"HTML::Mason::Commands\".\n\npreamble\nText given for this parameter is placed at the beginning of each component, but after the\nexecution of any \"<%once>\" block. See also postamble. The request will be available as $m in\npreamble code.\n\npostamble\nText given for this parameter is placed at the end of each component. See also preamble. The\nrequest will be available as $m in postamble code.\n\nusestrict\nTrue or false, default is true. Indicates whether or not a given component should \"use\nstrict\".\n\nusewarnings\nTrue or false, default is false. Indicates whether or not a given component should \"use\nwarnings\".\n\nnamedcomponentsubs\nWhen compiling a component, use uniquely named subroutines for the a component's body,\nsubcomponents, and methods. Doing this allows you to effectively profile Mason components.\nWithout this, all components simply show up as ANON or something similar in the\nprofiler.\n\ndefineargshash\nOne of \"always\", \"auto\", or \"never\". This determines whether or not an %ARGS hash is created\nin components. If it is set to \"always\", one is always defined. If set to \"never\", it is\nnever defined.\n\nThe default, \"auto\", will cause the hash to be defined only if some part of the component\ncontains the string \"ARGS\". This is somewhat crude, and may result in some false positives,\nbut this is preferable to false negatives.\n\nNot defining the args hash means that we can avoid copying component arguments, which can\nsave memory and slightly improve execution speed.\n",
                "subsections": []
            },
            "ACCESSOR METHODS": {
                "content": "All of the above properties have read-only accessor methods of the same name. You cannot change\nany property of a compiler after it has been created (but you can create multiple compilers with\ndifferent properties).\n",
                "subsections": []
            },
            "METHODS": {
                "content": "This class is primarily meant to be used by the Interpreter object, and as such has a very\nlimited public API.\n",
                "subsections": [
                    {
                        "name": "compile",
                        "content": "This method will take component source and return the compiled object code for that source.\nSee \"compile(...)\" in HTML::Mason::Compiler for details on this method.\n\nThis subclass also accepts a \"compclass\" parameter, allowing you to override the class into\nwhich the component is compiled.\n"
                    }
                ]
            }
        }
    }
}