NAME Plack::App::Tags::HTML - Plack application for running Tags::HTML objects. SYNOPSIS use Plack::App::Tags::HTML; my $obj = Plack::App::Tags::HTML->new(%parameters); my $app = $obj->to_app; METHODS Class inherites Plack::Component::Tags::HTML. "new" my $obj = Plack::App::Tags::HTML->new(%parameters); Constructor. Returns instance of object. * "component" Tags::HTML component. Option is required. * "constructor_args" Tags::HTML component constructor arguments. Default value is undef. * "data" Data structure as input argument of Tags::HTML::process(). Default value is undef. "to_app" my $app = $obj->to_app; Get code of plack application. Returns code of app. ERRORS prepare_app(): Cannot load component '%s'. Error: %s Component must be a instance of 'Tags::HTML' class. EXAMPLE use strict; use warnings; use Plack::App::Tags::HTML; use Plack::Runner; # Run application. my $app = Plack::App::Tags::HTML->new( 'component' => 'Tags::HTML::Stars', 'data' => { 1 => 'full', 2 => 'half', 3 => 'nothing', }, )->to_app; Plack::Runner->new->run($app); # Output: # HTTP::Server::PSGI: Accepting connections at http://0:5000/ # > curl http://localhost:5000/ # #
DEPENDENCIES English, Error::Pure, Plack::Component::Tags::HTML, Plack::Util::Accessor. SEE ALSO Tags::HTML Tags helper abstract class. REPOSITORY