Jifty::Handler - Methods related to the Mason handler
use Jifty; Jifty->new(); my $handler = Jifty::Handler->handle_request( cgi => $cgi ); # after each request is handled Jifty::Handler->cleanup_request;
Jifty::Handler provides methods required to deal with Mason CGI handlers.
Create a new Jifty::Handler object. Generally, Jifty.pm does this only once at startup.
Attempts to create our app's mason cache directory.
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.
Returns the CGI object for the current request, or
undef if there is none.
When your server processs (be it Jifty-internal, FastCGI or anything else) wants to handle a request coming in from the outside world, you should call
A CGI object that your server has already set up and loaded with your request's data.
Dispatchers should call this at the end of each request, as a class method. It flushes the session to disk, as well as flushing Jifty::DBI's cache.