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.
Returns the Jifty c<HTML::Mason> handler. While this "should" be just another template handler, we still rely on it for little bits of Jifty infrastructure. Patches welcome.
Create a new Jifty::Handler object. Generally, Jifty.pm does this only once at startup.
Returns a list of modules implementing view for your Jifty application.
XXX TODO: this should take pluggable views
Returns the object for our "last-resort" view handler. By default, this is the HTML::Mason handler.
Initialize all of our view handlers.
Returns the Jifty view handler for ClassName.
ClassName
Attempts to create our app's mason cache directory.
Returns the CGI object for the current request, or undef if there is none.
undef
Returns the HTML::Mason::FakeApache or Apache object for the current request, ot 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 handle_request.
handle_request
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.
To install Jifty, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Jifty
CPAN shell
perl -MCPAN -e shell install Jifty
For more information on module installation, please visit the detailed CPAN module installation guide.