HTML::Mason::PlackHandler - HTML::Mason handler using Plack::Request and Plack::Response
version 0.103070
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); }; };
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
HTML::Mason::PlackHandler
$req
$res
A redirect may be performed by calling $m->redirect($url, $code). $code will default to 302 if not specified.
$m->redirect($url, $code)
$code
302
HTML::Mason, HTML::Mason::Params, Plack::Request, Plack::Response
Graham Barr <gbarr@cpan.org>
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.
To install HTML::Mason::PlackHandler, copy and paste the appropriate command in to your terminal.
cpanm
cpanm HTML::Mason::PlackHandler
CPAN shell
perl -MCPAN -e shell install HTML::Mason::PlackHandler
For more information on module installation, please visit the detailed CPAN module installation guide.