Squatting::On::HTTP::Engine - run Squatting apps on top of HTTP::Engine
Squatting on top of HTTP::Engine::Interface::ServerSimple
# app_server_simple.pl #!/usr/bin/perl use strict; use warnings; use App 'On::HTTP::Engine'; App->init; App->http_engine( interface => { module => 'ServerSimple', args => { host => 'localhost', port => 2222, }, }, )->run;
Squatting on top of HTTP::Engine::Interface::FCGI
# app_fastcgi.pl #!/usr/bin/perl use strict; use warnings; use App 'On::HTTP::Engine'; App->init; App->http_engine( interface => { module => 'FCGI', args => { leave_umask => 0, keep_stderr => 1, nointr => 0, detach => 0, manager => 'FCGI::ProcManager', nproc => 4, pidfile => 'app.pid', listen => 'localhost:8000', }, )->run;
Squatting on top of HTTP::Engine::Interface::ModPerl
# App/ModPerl.pm package App::ModPerl; use Moose; extends 'HTTP::Engine::Interface::ModPerl'; use App 'On::HTTP::Engine'; App->init; sub create_engine { my ($class, $r, $context_key) = @_; App->http_engine(interface => { module => 'ModPerl' }); } 1;
This module makes it possible to run Squatting apps on top of HTTP::Engine.
This method creates an HTTP::Engine object based on the %options that are given to it. The %options are passed directly to HTTP::Engine's new() method and Squatting-based request_handler is provided. After you get an HTTP::Engine object back, you can call run() on it to start up an HTTP server in most cases. The only time you don't do this is when you're using the ModPerl interface. See the "SYNOPSIS" for some examples.
%options
new()
request_handler
run()
Squatting, HTTP::Engine, Mojo
John BEPPU <beppu@cpan.org>
Copyright (c) 2008 John BEPPU <beppu@cpan.org>.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
To install Squatting::On::HTTP::Engine, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Squatting::On::HTTP::Engine
CPAN shell
perl -MCPAN -e shell install Squatting::On::HTTP::Engine
For more information on module installation, please visit the detailed CPAN module installation guide.