Rechercher une page de manuel
Jifty::View::Mason::Handler.3pm
Langue: en
Version: 2008-04-08 (debian - 07/07/09)
Section: 3 (Bibliothèques de fonctions)
NAME
Jifty::View::Mason::Handler - Handler for Mason requests inside of JiftySUMMARY
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.new PARAMHASH
Takes a number of key-value parameters; see HTML::Mason::Params. Defaults the "out_method" to ``out_method'', and the "request_class" to HTML::Mason::Request::Jifty (below). Finally, adds "h" and "u" escapes, which map to ``escape_uri'' and escape_utf8 respectively.
config
Returns our Mason config. We use the component root specified in the "Web/TemplateRoot" framework configuration variable (or "html" by default). Additionally, we set up a "jifty" component root, as specified by the "Web/DefaultTemplateRoot" configuration. All interpolations are HTML-escaped by default, and we use the fatal error mode.
escape_utf8 SCALARREF
Does a css-busting but minimalist escaping of whatever html you're passing in.
escape_uri SCALARREF
Escapes in-place URI component according to RFC2396. Takes a reference to perl string.
*Note* that octets would be treated as latin1 encoded sequence and converted to UTF-8 encoding and then escaped. So this sub always provide UTF-8 escaped string. See also Encode for more info about converting.
template_exists COMPONENT
A convenience method for $self->interp->comp_exists(). (Jifty uses this method as part of its standard Templating system API).
show COMPONENT
Takes a component path to render. Deals with setting up a global HTML::Mason::FakeApache and Request object, and calling the component.
handle_comp
A synonym for show
request_args
The official source for request arguments is from the current Jifty::Request object.
HTML::Mason::Request::Jifty
Subclass of HTML::Mason::Request which is customised for Jifty's use.auto_send_headers
Doesn't send headers if this is a subrequest (according to the current Jifty::Request).
exec
Actually runs the component; in case no headers have been sent after running the component, and we're supposed to send headers, sends them.
redirect
Calls ``redirect'' in Jifty::Web.
Contenus ©2006-2024 Benjamin Poulain
Design ©2006-2024 Maxime Vantorre