HTTP::Engine::MinimalCGI - fast loading, minimal HTTP::Engine::Interface
use HTTP::Engine::MinimalCGI; my $engine = HTTP::Engine->new( interface => { module => 'MinimalCGI', request_handler => sub { my $req = shift; HTTP::Engine::Response->new( status => 200, body => 'Hello, world!', ); }, }, ); $engine->run;
HTTP::Engine::MinimalCGI implements a minimal version of the HTTP::Engine spec for the vanilla CGI environment. It has a very fast compile time-- on par with CGI::Simple or CGI.pm-- and is forward-compatible with the full HTTP::Engine spec. However, it is missing some features.
Request new hostname protocol method param upload Response new header headers status body protocol content_length content_type cookies
Some people says "HTTP::Engine is too heavy on my shared hosting account". Perhaps you believe that professional web developers don't use vanilla CGI. But newbies and small projects use shared hosting accounts and will find the performance of this solution in vanilla CGI is sufficient.
DO NOT LOAD FULL SPEC HTTP::Engine AND THIS MODULE IN ONE PROCESS. HTTP::Engine::MinimalCGI provides alternative, conflicting implementations of the HTTP::Engine, HTTP::Engine::Request, HTTP::Engine::Response namespaces.
CGI::Simple, HTTP::Headers::Fast, Scalar::Util
tokuhirom
Mark Stosberg <mark@summersault.com> - helped with the documentation.
To install HTTP::Engine, copy and paste the appropriate command in to your terminal.
cpanm
cpanm HTTP::Engine
CPAN shell
perl -MCPAN -e shell install HTTP::Engine
For more information on module installation, please visit the detailed CPAN module installation guide.