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" Array data structure as input argument of Tags::HTML::process(). Default value is undef. * "data_css" Reference to array with structure for input argument of Tags::HTML::process_css(). Default value is undef. * "data_init" Reference to array with structure for input argument of Tags::HTML::init(). This structure is used in init phase of each web app call. Default value is undef. * "data_prepare" Reference to array with structure for input argument of Tags::HTML::prepare(). This structure is used in prepare phase of web app run. 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. EXAMPLE1 use strict; use warnings; use CSS::Struct::Output::Indent; use Plack::App::Tags::HTML; use Plack::Runner; use Tags::Output::Indent; # Run application. my $app = Plack::App::Tags::HTML->new( 'component' => 'Tags::HTML::Stars', 'css' => CSS::Struct::Output::Indent->new,, 'data' => [{ 1 => 'full', 2 => 'half', 3 => 'nothing', }], 'tags' => Tags::Output::Indent->new( 'preserved' => ['style'], ), )->to_app; Plack::Runner->new->run($app); # Output: # HTTP::Server::PSGI: Accepting connections at http://0:5000/ # > curl http://localhost:5000/ # # #
# # # # # # # #