NAME

HTML::Mason::PlackHandler - HTML::Mason handler using Plack::Request and Plack::Response

VERSION

version 0.103070

SYNOPSIS

use HTML::Mason::PlackHandler;
use Plack::Builder;

my $mason = HTML::Mason::PlackHandler->new(comp_root => $ENV{PWD});

builder {
  mount "/" => sub {
    my $env = shift;
    $mason->handle_request($env);
  };
};

DESCRIPTION

HTML::Mason::PlackHandler will process mason templates making available a Plack::Request object as $req and a Plack::Response object as $res. See HTML::Mason::Params for details of parameters for configuring HTML::Mason

A redirect may be performed by calling $m->redirect($url, $code). $code will default to 302 if not specified.

SEE ALSO

HTML::Mason, HTML::Mason::Params, Plack::Request, Plack::Response

AUTHOR

Graham Barr <gbarr@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2010 by Graham Barr.

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