NAME
Mojo - The Web In A Box!
SYNOPSIS
use base 'Mojo';
# All the complexities of CGI, FastCGI and HTTP get reduced to a
# single method call!
sub handler {
my ($self, $tx) = @_;
# Request
my $method = $tx->req->method;
my $path = $tx->req->url->path;
# Response
$tx->res->headers->content_type('text/plain');
$tx->res->body("$method request for $path!");
}
DESCRIPTION
Mojo provides a minimal interface between web servers and Perl web frameworks.
Also included in the distribution are two MVC web frameworks named Mojolicious and Mojolicious::Lite.
Currently there are no requirements besides Perl 5.8.1.
.------------------------------------------------------------.
| |
| Application .-------------------------------------------'
| | .-------------------. .-------------------.
| | | Mojolicious | | Mojolicious::Lite |
'----------------' '-------------------' '-------------------'
.------------------------------------------------------------.
| Mojo |
'------------------------------------------------------------'
.------------------. .------------------. .------------------.
| CGI | | FastCGI | | HTTP 1.1 |
'------------------' '------------------' '------------------'
For userfriendly documentation see Mojo::Manual.
ATTRIBUTES
Mojo implements the following attributes.
home
my $home = $mojo->home;
$mojo = $mojo->home(Mojo::Home->new);
log
my $log = $mojo->log;
$mojo = $mojo->log(Mojo::Log->new);
METHODS
Mojo inherits all methods from Mojo::Base and implements the following new ones.
new
my $mojo = Mojo->new;
build_tx
my $tx = $mojo->build_tx;
handler
$tx = $mojo->handler($tx);
start
Mojo->start;
Mojo->start('daemon');
SUPPORT
Web
http://mojolicious.org
IRC
#mojo on irc.perl.org
Mailing-List
http://lists.kraih.com/listinfo/mojo
DEVELOPMENT
Repository
http://github.com/kraih/mojo/commits/master
SEE ALSO
AUTHOR
Sebastian Riedel, sri@cpan.org
.
CREDITS
In alphabetical order:
Adam Kennedy
Anatoly Sharifulin
Andreas Koenig
Andy Grundman
Aristotle Pagaltzis
Ask Bjoern Hansen
Audrey Tang
Breno G. de Oliveira
Burak Gursoy
Ch Lamprecht
Christian Hansen
Gisle Aas
Graham Barr
James Duncan
Jesse Vincent
Kazuhiro Shibuya
Kevin Old
Lars Balker Rasmussen
Leon Brocard
Maik Fischer
Marcus Ramberg
Mark Stosberg
Maxym Komar
Pascal Gaudette
Pedro Melo
Pierre-Yves Ritschard
Randal Schwartz
Robert Hicks
Shu Cho
Uwe Voelker
Viacheslav Tikhanovskii
Yuki Kimoto
COPYRIGHT
Copyright (C) 2008-2009, Sebastian Riedel.
LICENSE
This program is free software, you can redistribute it and/or modify it under the terms of the Artistic License version 2.0.