.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .ie \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . nr % 0 . rr F .\} .el \{\ . de IX .. .\} .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "Jifty::View::Mason::Handler 3pm" .TH Jifty::View::Mason::Handler 3pm "2010-12-08" "perl v5.14.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Jifty::View::Mason::Handler \- Handler for Mason requests inside of Jifty .SH "SUMMARY" .IX Header "SUMMARY" Jifty controls all of the input and output from the Mason templating engine; this means that we cannot use the Mason's standard HTML::Mason::CGIHandler interface to interact with it. .SS "new \s-1PARAMHASH\s0" .IX Subsection "new PARAMHASH" Takes a number of key-value parameters; see HTML::Mason::Params. Defaults the \f(CW\*(C`out_method\*(C'\fR to appending to \*(L"buffer\*(R" in Jifty::Handler and the \f(CW\*(C`request_class\*(C'\fR to Jifty::View::Mason::Request (below). Finally, adds \f(CW\*(C`h\*(C'\fR and \f(CW\*(C`u\*(C'\fR escapes, which map to \*(L"escape_uri\*(R" and escape_utf8 respectively. .SS "config" .IX Subsection "config" Returns our Mason config. We use the component root specified in the \&\f(CW\*(C`Web/TemplateRoot\*(C'\fR framework configuration variable (or \f(CW\*(C`html\*(C'\fR by default). Additionally, we set up a \f(CW\*(C`jifty\*(C'\fR component root, as specified by the \f(CW\*(C`Web/DefaultTemplateRoot\*(C'\fR configuration. All interpolations are HTML-escaped by default, and we use the fatal error mode. .SS "escape_utf8 \s-1SCALARREF\s0" .IX Subsection "escape_utf8 SCALARREF" Does a css-busting but minimalist escaping of whatever html you're passing in. .SS "escape_uri \s-1SCALARREF\s0" .IX Subsection "escape_uri SCALARREF" Escapes in-place \s-1URI\s0 component according to \s-1RFC2396\s0. Takes a reference to perl string. .PP *Note* that octets would be treated as latin1 encoded sequence and converted to \s-1UTF\-8\s0 encoding and then escaped. So this sub always provide \s-1UTF\-8\s0 escaped string. See also Encode for more info about converting. .SS "template_exists \s-1COMPONENT\s0" .IX Subsection "template_exists COMPONENT" Checks if the \f(CW\*(C`COMPONENT\*(C'\fR exists, or if \f(CW\*(C`COMPONENT/index.html\*(C'\fR exists, and returns which one did. If neither did, it searches for \&\f(CW\*(C`dhandler\*(C'\fR components which could match, returning \f(CW\*(C`COMPONENT\*(C'\fR if it finds one. Finally, if it finds no possible component matches, returns undef. .PP Note that this algorithm does not actually decisively return if Mason \&\fIwill\fR handle a given component; the \fIdhandler\fRs could defer handling, for instance. .SS "show \s-1COMPONENT\s0" .IX Subsection "show COMPONENT" Takes a component path to render. Deals with setting up a global HTML::Mason::FakeApache and Request object, and calling the component. .SS "handle_comp" .IX Subsection "handle_comp" A synonym for show .SS "request_args" .IX Subsection "request_args" The official source for request arguments is from the current Jifty::Request object. .SS "create_cache_directories" .IX Subsection "create_cache_directories" Attempts to create our application's mason cache directory.