NAME Plack::App::Search - Plack search application. SYNOPSIS use Plack::App::Search; my $obj = Plack::App::Search->new(%parameters); my $psgi_ar = $obj->call($env); my $app = $obj->to_app; METHODS "new" my $obj = Plack::App::Search->new(%parameters); Constructor. Returns instance of object. * "css" Instance of CSS::Struct::Output object. Default value is CSS::Struct::Output::Raw instance. * "generator" HTML generator string. Default value is 'Plack::App::Search; Version: __VERSION__' * "image_link" URL to image above form. Image is centered. Default value is undef. * "search_method" Search method. Default value is 'search'. * "search_title" Search title. There will be button with text in this title if is defined. If not, form is without button. Default value is undef. * "search_url" Search URL. Default value is 'https://env.skim.cz'. * "tags" Instance of Tags::Output object. Default value is Tags::Output::Raw->new('xml' => 1) instance. * "title" Page title. Default value is 'Login page'. "call" my $psgi_ar = $obj->call($env); Implementation of search page. Returns reference to array (PSGI structure). "to_app" my $app = $obj->to_app; Creates Plack application. Returns Plack::Component object. EXAMPLE use strict; use warnings; use CSS::Struct::Output::Indent; use Plack::App::Search; use Plack::Runner; use Tags::Output::Indent; # Run application. my $app = Plack::App::Search->new( 'css' => CSS::Struct::Output::Indent->new, 'generator' => 'Plack::App::Search', 'tags' => Tags::Output::Indent->new( 'preserved' => ['style'], 'xml' => 1, ), )->to_app; Plack::Runner->new->run($app); # Output: # HTTP::Server::PSGI: Accepting connections at http://0:5000/ # > curl http://localhost:5000/ # # # # # # # # Search page # # # # #
# #
# # DEPENDENCIES Plack::Component::Tags::HTML, Plack::Util::Accessor, Tags::HTML::Container. REPOSITORY AUTHOR Michal Josef Špaček LICENSE AND COPYRIGHT © 2021-2023 Michal Josef Špaček BSD 2-Clause License VERSION 0.02