Kazuhiro Osawa > HTTP-Engine-Compat > HTTP::Engine::Compat

Download:
HTTP-Engine-Compat-0.03.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  0
View/Report Bugs
Module Version: 0.03   Source  

NAME ^

HTTP::Engine::Compat - version 0.0.12 Compatibility layer of HTTP::Engine

SYNOPSIS ^

  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) );
  }

DESCRIPTION ^

HTTP::Engine::Compat is version 0.0.12 Compatibility layer of HTTP::Engine.

The element of Context and Middleware are added to HTTP::Engine.

MIDDLEWARES ^

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 ) ];

METHODS ^

HTTP::Engine::Compat->load_middleware(middleware)
HTTP::Engine::Compat->load_middlewares(qw/ middleware middleware /)

Loads the given middleware into the HTTP::Engine.

AUTHOR ^

Tokuhiro Matsuno <tokuhirom@gmail.com>

Kazuhiro Osawa

SEE ALSO ^

HTTP::Engine

LICENSE ^

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

syntax highlighting: