HTTP::Engine::Compat - version 0.0.12 Compatibility layer of HTTP::Engine
use HTTP::Engine::Compat; my $engine = HTTP::Engine->new( interface => { module => 'ServerSimple', args => { host => 'localhost', port => 1978, }, request_handler => 'main::handle_request',# or CODE ref }, ); $engine->run; use Data::Dumper; sub handle_request { my $c = shift; $c->res->body( Dumper($c->req) ); }
HTTP::Engine::Compat is version 0.0.12 Compatibility layer of HTTP::Engine.
The element of Context and Middleware are added to HTTP::Engine.
For all non-core middlewares (consult #codrepos@freenode first), use the HTTPEx:: namespace. For example, if you have a plugin module named "HTTPEx::Middleware::Foo", you could load it as
use HTTP::Engine::Compat middlewares => [ qw( +HTTPEx::Plugin::Foo ) ];
Loads the given middleware into the HTTP::Engine.
Tokuhiro Matsuno <tokuhirom@gmail.com>
Kazuhiro Osawa
HTTP::Engine
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install HTTP::Engine::Compat, copy and paste the appropriate command in to your terminal.
cpanm
cpanm HTTP::Engine::Compat
CPAN shell
perl -MCPAN -e shell install HTTP::Engine::Compat
For more information on module installation, please visit the detailed CPAN module installation guide.