{
    "content": [
        {
            "type": "text",
            "text": "# HTML::Mason::ApacheHandler (perldoc)\n\n## NAME\n\nHTML::Mason::ApacheHandler - Mason/modperl interface\n\n## SYNOPSIS\n\nuse HTML::Mason::ApacheHandler;\nmy $ah = HTML::Mason::ApacheHandler->new (..name/value params..);\n...\nsub handler {\nmy $r = shift;\n$ah->handlerequest($r);\n}\n\n## DESCRIPTION\n\nThe ApacheHandler object links Mason to modperl (version 1 or 2), running components in\nresponse to HTTP requests. It is controlled primarily through parameters to the new()\nconstructor.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **ACCESSOR METHODS**\n- **OTHER METHODS**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "HTML::Mason::ApacheHandler",
        "section": "",
        "mode": "perldoc",
        "summary": "HTML::Mason::ApacheHandler - Mason/modperl interface",
        "synopsis": "use HTML::Mason::ApacheHandler;\nmy $ah = HTML::Mason::ApacheHandler->new (..name/value params..);\n...\nsub handler {\nmy $r = shift;\n$ah->handlerequest($r);\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": 43,
                "subsections": []
            },
            {
                "name": "ACCESSOR METHODS",
                "lines": 8,
                "subsections": []
            },
            {
                "name": "OTHER METHODS",
                "lines": 41,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "HTML::Mason::ApacheHandler - Mason/modperl interface\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "use HTML::Mason::ApacheHandler;\n\nmy $ah = HTML::Mason::ApacheHandler->new (..name/value params..);\n...\nsub handler {\nmy $r = shift;\n$ah->handlerequest($r);\n}\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "The ApacheHandler object links Mason to modperl (version 1 or 2), running components in\nresponse to HTTP requests. It is controlled primarily through parameters to the new()\nconstructor.\n\nPARAMETERS TO THE new() CONSTRUCTOR\napachestatustitle\nTitle that you want this ApacheHandler to appear as under Apache::Status. Default is\n\"HTML::Mason status\". This is useful if you create more than one ApacheHandler object and\nwant them all visible via Apache::Status.\n\nargsmethod\nMethod to use for unpacking GET and POST arguments. The valid options are 'CGI' and\n'modperl'; these indicate that a \"CGI.pm\" or \"Apache::Request\" object (respectively) will\nbe created for the purposes of argument handling.\n\n'modperl' is the default under modperl-1 and requires that you have installed the\n\"Apache::Request\" package. Under modperl-2, the default is 'CGI' because \"Apache2::Request\"\nis still in development.\n\nIf argsmethod is 'modperl', the $r global is upgraded to an Apache::Request object. This\nobject inherits all Apache methods and adds a few of its own, dealing with parameters and\nfile uploads. See \"Apache::Request\" for more information.\n\nIf the argsmethod is 'CGI', the Mason request object ($m) will have a method called\n\"cgiobject\" available. This method returns the CGI object used for argument processing.\n\nWhile Mason will load \"Apache::Request\" or \"CGI\" as needed at runtime, it is recommended\nthat you preload the relevant module either in your httpd.conf or handler.pl file, as this\nwill save some memory.\n\ndeclinedirs\nTrue or false, default is true. Indicates whether Mason should decline directory requests,\nleaving Apache to serve up a directory index or a \"FORBIDDEN\" error as appropriate. See the\nallowing directory requests section of the administrator's manual for more information about\nhandling directories with Mason.\n\ninterp\nThe interpreter object to associate with this compiler. By default a new object of the\nspecified interpclass will be created.\n\ninterpclass\nThe class to use when creating a interpreter. Defaults to HTML::Mason::Interp.\n",
                "subsections": []
            },
            "ACCESSOR METHODS": {
                "content": "All of the above properties, except interpclass, have standard accessor methods of the same\nname: no arguments retrieves the value, and one argument sets it, except for argsmethod, which\nis not settable. For example:\n\nmy $ah = HTML::Mason::ApacheHandler->new;\nmy $declinedirs = $ah->declinedirs;\n$ah->declinedirs(1);\n",
                "subsections": []
            },
            "OTHER METHODS": {
                "content": "The ApacheHandler object has a few other publicly accessible methods that may be of interest to\nend users.\n\nhandlerequest ($r)\nThis method takes an Apache or Apache::Request object representing a request and translates\nthat request into a form Mason can understand. Its return value is an Apache status code.\n\nPassing an Apache::Request object is useful if you want to set Apache::Request parameters,\nsuch as POSTMAX or DISABLEUPLOADS.\n\npreparerequest ($r)\nThis method takes an Apache object representing a request and returns a new Mason request\nobject or an Apache status code. If it is a request object you can manipulate that object as\nyou like, and then call the request object's \"exec\" method to have it generate output.\n\nIf this method returns an Apache status code, that means that it could not create a Mason\nrequest object.\n\nThis method is useful if you would like to have a chance to decline a request based on\nproperties of the Mason request object or a component object. For example:\n\nmy $req = $ah->preparerequest($r);\n# $req must be an Apache status code if it's not an object\nreturn $req unless ref($req);\n\nreturn DECLINED\nunless $req->requestcomp->sourcefile =~ /\\.html$/;\n\n$req->exec;\n\nrequestargs ($r)\nGiven an Apache request object, this method returns a three item list. The first item is a\nhash reference containing the arguments passed by the client's request.\n\nThe second is an Apache request object. This is returned for backwards compatibility from\nwhen this method was responsible for turning a plain Apache object into an Apache::Request\nobject.\n\nThe third item may be a CGI.pm object or \"undef\", depending on the value of the argsmethod\nparameter.\n",
                "subsections": []
            }
        }
    }
}