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. * "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_height" Image height. Default value is undef, this mean real height of image. * "image_link" URL to image above form. Image is centered. Default value is undef. * "image_radius" CSS radius of image. Default value is 0. * "search_method" Search method. Default value is 'search'. * "search_placeholder" Search placeholder text. It's optional. Default value is undef. * "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'. Returns instance of object. "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. EXAMPLE1 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/ # # #
# # # #