The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

Build Status

NAME

Amon2 - lightweight web application framework

SYNOPSIS

package MyApp;
use parent qw/Amon2/;
use Amon2::Config::Simple;
sub load_config { Amon2::Config::Simple->load(shift) }

DESCRIPTION

Amon2 is simple, readable, extensible, STABLE, FAST web application framework based on Plack.

METHODS

CLASS METHODS for Amon2 class

CLASS METHODS for inherited class

PROJECT LOCAL MODE

THIS MODE IS HIGHLY EXPERIMENTAL

Normally, Amon2's context is stored in a global variable.

This module makes the context to project local.

It means, normally context class using Amon2 use $Amon2::CONTEXT in each project, but context class using "PROJECT LOCAL MODE" use $MyApp::CONTEXT.

It means you can't use code depend <Amon2-context>> and <Amon2-context>> under this mode.>

NOTES ABOUT create_request

Older Amon2::Web::Request has only 1 argument like following, it uses Amon2->context to get encoding:

sub create_request {
    my ($class, $env) = @_;
    Amon2::Web::Request->new($env);
}

If you want to use "PROJECT LOCAL MODE", you need to pass class name of context class, as following:

sub create_request {
    my ($class, $env) = @_;
    Amon2::Web::Request->new($env, $class);
}

HOW DO I ENABLE PROJECT LOCAL MODE?

MyApp-make_local_context() > turns on the project local mode.

There is no way to revert it, thanks.

METHODS

This module inserts 3 methods to your context class.

DOCUMENTS

More complicated documents are available on http://amon.64p.org/

SUPPORTS

#amon at irc.perl.org is also available.

AUTHOR

Tokuhiro Matsuno tokuhirom@gmail.com

CONTRIBUTORS

LICENSE

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.