NAME

Mojo - The Web In A Box!

SYNOPSIS

use base 'Mojo';

sub handler {
    my ($self, $tx) = @_;

    # Hello world!
    $tx->res->code(200);
    $tx->res->headers->content_type('text/plain');
    $tx->res->body('Congratulations, your Mojo is working!');
}

DESCRIPTION

Mojo is a collection of libraries and example web frameworks for web framework developers.

If you are searching for a higher level MVC web framework you should take a look at Mojolicious.

Don't be scared by the amount of different modules in the distribution, they are all very loosely coupled. You can just pick the ones you like and ignore the rest, there is no tradeoff.

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;

Returns a new Mojo object.

build_tx

my $tx = $mojo->build_tx;

Returns a new Mojo::Transaction object; Meant to be overloaded in subclasses.

handler

$tx = $mojo->handler($tx);

Returns and takes a Mojo::Transaction object as first argument. Meant to be overloaded in subclasses.

sub handler {
    my ($self, $tx) = @_;

    # Hello world!
    $tx->res->code(200);
    $tx->res->headers->content_type('text/plain');
    $tx->res->body('Congratulations, your Mojo is working!');

    return $tx;
}

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

Mojolicious

AUTHOR

Sebastian Riedel, sri@cpan.org.

CREDITS

In alphabetical order:

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

Lars Balker Rasmussen

Leon Brocard

Marcus Ramberg

Mark Stosberg

Maxym Komar

Pascal Gaudette

Pedro Melo

Randal Schwartz

Robert Hicks

Shu Cho

Uwe Voelker

vti

And thanks to everyone else i might have forgotten. (Please send me a mail)

COPYRIGHT

Copyright (C) 2008-2009, Sebastian Riedel.

This program is free software, you can redistribute it and/or modify it under the same terms as Perl 5.10.