apachehandler(3)
NAME
HTML::Mason::ApacheHandler - Mason/mod_perl interface
SYNOPSIS
use HTML::Mason::ApacheHandler;
my $ah = new HTML::Mason::ApacheHandler (..name/value
params..);
...
sub handler {
my $r = shift;
$ah->handle_request($r);
}
DESCRIPTION
The ApacheHandler object links Mason to mod_perl, running
components in response to HTTP requests. It is controlled
primarily through parameters to the new() constructor.
- handle_request() is not a user method, but rather is called from the HTML:[4ms0:Mason::handler()[24m [4mrou
- tine[24m [4min[0m
[4mhandler.pl.[0m - [4mPARAMETERS[24m [4mTO[24m [4mTHE[24m [4muse()[24m
- [4mDECLARATION[0m [4mThe[24m [4mfollowing[24m [4mare[24m [4mparameters[24m
- [4mto[24m [4mpass[24m [4mexplicitly[24m [4mwhen[24m [4musing[0m
[4mHTML::Mason::ApacheHandler.[24m [4me.g.[0m
[4muse[24m [4mHTML::Mason::ApacheHandler[24m- [4m(args_method=>'mod_perl');[0m
- [4margs_method[0m
- [4mMethod[24m [4mto[24m [4muse[24m [4mfor[24m
- [4munpacking[24m [4mGET[24m [4mand[24m [4mPOST[24m [4margu
- ments.[0m
[4mThe[24m [4mvalid[24m [4moptions[24m [4mare[24m - [4m'CGI'[24m [4mand[24m [4m'mod_perl';[24m [4mthese[0m
[4mindicate[24m [4mthat[24m [4ma[24m [4mCGI.pm[24m - [4mor[24m [4mApache::Request[24m [4mobject[0m
[4m(respectively)[24m [4mwill[24m [4mbe[24m [4mcreat - ed[24m [4mfor[24m [4mthe[24m [4mpurposes[24m [4mof[0m
[4margument[24m [4mhandling.[24m [4mThese[24m [4mob - jects[24m [4mare,[24m [4munfortunately,[0m
[4mnot[24m [4myet[24m [4maccessible[24m [4mfrom[24m - [4mcomponents.[0m
- [4m'CGI'[24m [4mis[24m [4mthe[24m [4mdefault[24m
- [4mand[24m [4mshould[24m [4mwork[24m [4mon[24m [4mmost[24m
- [4mPerl[24m [4msys[0m
[4mtems.[24m [4mHowever,[24m [4mif[24m [4myou[24m - [4mhave[24m [4mthe[24m [4mApache::Request[24m [4mpackage[0m
[4m(or[24m [4mare[24m [4minclined[24m [4mto[24m - [4mfetch[24m [4mit[24m [4mfrom[24m [4mCPAN),[24m [4myou[24m
- [4mmight[0m
[4mswitch[24m [4mto[24m [4m'mod_perl'[24m [4mfor[24m - [4mspeed[24m [4mand[24m [4mmemory[24m [4mefficiency.[0m
- [4mWhen[24m [4mspecifying[24m
- [4margs_method='CGI',[24m [4mthe[24m [4mMason[24m [4mrequest[0m
[4mobject[24m [4m($m)[24m [4mwill[24m [4mhave[24m - [4ma[24m [4mmethod[24m [4mcalled[24m [4m"cgi_object"[0m
[4mavailable.[24m [4mThis[24m [4mmethod[24m [4mre - turns[24m [4mthe[24m [4mCGI[24m [4mobject[24m [4mused[24m
- [4min[0m
[4mthe[24m [4mApacheHandler[24m [4mcode.[0m - [4mWhen[24m [4mspecifying[24m
- [4margs_method='mod_perl',[24m [4mthe[24m [4m$r[24m [4mglobal[0m
[4mis[24m [4mupgraded[24m [4mto[24m [4man[24m [4mA - pache::Request[24m [4mobject.[24m [4mThis[24m [4mobject[0m
[4minherits[24m [4mall[24m [4mApache[24m [4mmeth - ods[24m [4mand[24m [4madds[24m [4ma[24m [4mfew[24m [4mof[24m
- [4mits[24m [4mown,[0m
[4mdealing[24m [4mwith[24m [4mparameters[24m - [4mand[24m [4mfile[24m [4muploads.[24m [4mSee[0m
[4mApache::Request[24m [4mmanual[24m [4mpage[24m - [4mfor[24m [4mmore[24m [4minformation.[0m
- [4mPARAMETERS[24m [4mTO[24m [4mTHE[24m [4mnew()[24m
- [4mCONTRUCTOR[0m
- [4mapache_status_title[0m
- [4mTitle[24m [4mthat[24m [4myou[24m [4mwant[24m
- [4mthis[24m [4mApacheHandler[24m [4mto[24m [4mappear[24m [4mas[0m
[4munder[24m [4mApache::Status.[24m [4mDefault[24m - [4mis[24m [4m"HTML::Mason[24m [4msta[0m
[4mtus".[24m [4mThis[24m [4mis[24m [4museful[24m - [4mif[24m [4myou[24m [4mcreate[24m [4mmore[24m [4mthen[24m
- [4mone[0m
[4mApacheHandler[24m [4mobject[24m [4mand[24m - [4mwant[24m [4mthem[24m [4mall[24m [4mvisible[24m [4mvia[0m
[4mApache::Status.[0m - [4mauto_send_headers[0m
- [4mTrue[24m [4mor[24m [4mundef;[24m [4mdefault[24m
- [4mtrue.[24m [4mIndicates[24m [4mwhether[24m [4mMason[0m
[4mshould[24m [4mautomatically[24m [4msend[24m - [4mHTTP[24m [4mheaders[24m [4mbefore[24m [4msending[0m
[4mcontent[24m [4mback[24m [4mto[24m [4mthe[24m - [4mclient.[24m [4mIf[24m [4myou[24m [4mset[24m [4mto[24m
- [4mfalse,[24m [4myou[0m
[4mshould[24m [4mcall[24m [4m$r->send_http_header[24m - [4mmanually.[0m
- [4mSee[24m [4mthe[24m [4mDevel/sending_http_head
- ers[24m [4mof[24m [4mthe[24m [4mComponent[0m
[4mDeveloper's[24m [4mGuide[24m [4mfor[24m [4mde - tails[24m [4mabout[24m [4mthe[24m [4mautomatic[0m
[4mheader[24m [4mfeature.[0m - [4mdebug_handler_proc,[24m [4mdebug_handler_script,[24m
- [4mdebug_mode,[0m
[4mdebug_perl_binary[0m - [4mThe[24m [4mdebug_*[24m [4mparameters[24m [4mcon
- trol[24m [4mMason's[24m [4muse[24m [4mof[24m [4mdebug[0m
[4mfiles.[24m [4mComponent[24m [4mAdmin/debugging[24m - [4mprocedures[24m [4mare[24m [4mfully[0m
[4mdescribed[24m [4min[24m [4mthe[24m [4mMason[24m - [4mAdministrator's[24m [4mGuide.[0m
- [4mdecline_dirs[0m
- [4mIndicates[24m [4mwhether[24m [4mMason[24m
- [4mshould[24m [4mdecline[24m [4mdirectory[0m
[4mrequests,[24m [4mleaving[24m [4mApache[24m - [4mto[24m [4mserve[24m [4mup[24m [4ma[24m [4mdirectory[24m [4min
- dex[0m
[4mor[24m [4ma[24m [4mFORBIDDEN[24m [4merror[24m - [4mas[24m [4mappropriate.[24m [4mDefault[24m [4mis[24m [4m1.[24m
- [4mSee[0m
[4mAdmin/Allowing[24m [4mdirectory[24m [4mrequests[24m - [4mfor[24m [4mmore[24m [4minformation[0m
[4mabout[24m [4mhandling[24m [4mdirectories[24m - [4mwith[24m [4mMason.[0m
- [4merror_mode[0m
- [4mSpecifies[24m [4mone[24m [4mof[24m [4mtwo[24m
- [4mways[24m [4mto[24m [4mhandle[24m [4mPerl[24m [4merrors,[0m
[4m'fatal'[24m [4mor[24m [4m'html'.[24m [4mIn[24m - [4mfatal[24m [4mmode[24m [4mthe[24m [4mhandler[24m [4msimply[0m
[4mdies[24m [4mwith[24m [4mthe[24m [4merror[24m - [4mmessage.[24m [4mThis[24m [4mmay[24m [4mbe[24m [4mcaught[24m
- [4mwith[0m
[4man[24m [4meval[24m [4maround[24m [4m"$ah->han - dle_request"[24m [4mor[24m [4mleft[24m [4mfor[0m
[4mApache[24m [4mto[24m [4mhandle[24m [4m(general - ly[24m [4mwith[24m [4ma[24m [4mreturn[24m [4mstatus[24m [4mof[0m
[4m500).[24m [4mIn[24m [4mHTML[24m [4mmode[24m - [4mthe[24m [4mhandler[24m [4msends[24m [4ma[24m [4mreadable[24m
- [4mHTML[0m
[4mversion[24m [4mof[24m [4mthe[24m [4merror[24m - [4mmessage[24m [4mto[24m [4mthe[24m [4mclient.[24m [4mHTML[24m
- [4mmode[0m
[4mis[24m [4mmost[24m [4museful[24m [4min[24m [4mcom - bination[24m [4mwith[24m [4mbatch[24m [4moutput[24m [4mmode[0m
[4mfor[24m [4mdebugging.[0m - [4moutput_mode[0m
- [4mThis[24m [4mparameter[24m [4mhas[24m [4mbeen[24m
- [4mreplaced[24m [4mby[24m [4mthe[24m [4mequivalent[0m
[4mInterp[24m [4mparameter[24m [4mInterp/out_mode.[24m - [4mFor[24m [4mbackward[24m [4mcompat[0m
[4mibility,[24m [4msetting[24m [4m"$ah->out - put_mode"[24m [4mwill[24m [4mcause[0m
[4m"$interp->out_mode"[24m [4mto[24m [4mbe[24m - [4mset[24m [4mappropriately.[0m
- [4mtop_level_predicate[0m
- [4mReference[24m [4mto[24m [4ma[24m [4msubroutine[24m
- [4mthat[24m [4mdecides[24m [4mwhether[24m [4ma[24m [4mcom[0m
[4mponent[24m [4mcan[24m [4manswer[24m [4mtop[24m - [4mlevel[24m [4mrequests.[24m [4mThis[24m [4mallows[24m [4mfor[0m
[4mprivate-use[24m [4mcomponents[24m [4mthat[24m - [4mlive[24m [4mwithin[24m [4mthe[24m [4mDocument[0m
[4mRoot[24m [4mbut[24m [4mare[24m [4minaccesible[24m - [4mfrom[24m [4mURLs.[24m [4mBy[24m [4mdefault,[24m [4malways[0m
[4mreturns[24m [4m1.[0m - [4mThe[24m [4msubroutine[24m [4mreceives[24m
- [4mone[24m [4mparameter,[24m [4mthe[24m [4mabsolute[0m
[4mpath[24m [4mto[24m [4mthe[24m [4mcomponent.[24m - [4mIt[24m [4mthen[24m [4mreturns[24m [4meither[24m [4ma[24m
- [4mtrue[0m
[4m(serve[24m [4mcomponent)[24m [4mor[24m [4mfalse[24m - [4m(reject[24m [4mcomponent).[24m [4mIn[24m [4mthis[0m
[4mexample,[24m [4mthe[24m [4mpredicate[24m [4mre - jects[24m [4mrequests[24m [4mfor[24m [4mcomponents[0m
[4mwhose[24m [4mname[24m [4mstarts[24m [4mwith[24m - [4man[24m [4m"_"[24m [4mcharacter:[0m
[4mtop_level_predicate[24m [4m=>[24m [4msub[24m[4m{[24m [4m$_[0][24m [4m!~[24m [4mm{/_[^/]+$}[0m - [4mACCESSOR[24m [4mMETHODS[0m
- [4mAll[24m [4mof[24m [4mthe[24m [4mabove[24m [4mproper
- ties[24m [4mhave[24m [4mstandard[24m [4maccessor[24m [4mmeth
- ods[0m
[4mof[24m [4mthe[24m [4msame[24m [4mname:[24m [4mno[24m - [4marguments[24m [4mretrieves[24m [4mthe[24m [4mvalue,[24m
- [4mand[0m
[4mone[24m [4margument[24m [4msets[24m [4mit.[24m - [4mFor[24m [4mexample:[0m
[4mmy[24m [4m$ah[24m [4m=[24m [4mnew[24m [4mHTML::Ma- son::ApacheHandler;[0m
[4mmy[24m [4m$errmode[24m [4m=[24m [4m$ah->er - ror_mode;[0m
[4m$ah->error_mode('html');[0m - [4mAUTHOR[0m
- [4mJonathan[24m [4mSwartz,[24m [4mswartz@pobox.com[0m
- [4mSEE[24m [4mALSO[0m
[4mHTML::Mason,[24m [4mHTML::Mason::Parser,[24m - [4mHTML::Mason::Interp,[0m
[4mHTML::Mason::Admin[0m - [4m2001-01-05[24m [4mperl[24m [4mv5.6.1[24m