Changeset 17573 for lang/perl

Show
Ignore:
Timestamp:
08/13/08 16:06:43 (5 years ago)
Author:
yappo
Message:

wrote pod

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/perl/HTTP-Engine-Compat/trunk/lib/HTTP/Engine/Compat.pm

    r17569 r17573  
    11package HTTP::Engine::Compat; 
    22use Moose; 
    3 use 5.00800; 
    43our $VERSION = '0.01'; 
    54 
    6 extends 'HTTP::Engine'; 
     5#extends 'HTTP::Engine'; 
    76use HTTP::Engine; 
    87use HTTP::Engine::RequestProcessor; 
     
    161160=encoding utf8 
    162161 
     162=for stopwords middlewares Middleware middleware nothingmuch kan 
     163 
    163164=head1 NAME 
    164165 
    165 HTTP::Engine::Compat - 
     166HTTP::Engine::Compat - version 0.0.12 Compatibility layer of HTTP::Engine 
    166167 
    167168=head1 SYNOPSIS 
    168169 
    169170  use HTTP::Engine::Compat; 
     171  my $engine = HTTP::Engine->new( 
     172      interface => { 
     173          module => 'ServerSimple', 
     174          args   => { 
     175              host => 'localhost', 
     176              port =>  1978, 
     177          }, 
     178          request_handler => 'main::handle_request',# or CODE ref 
     179      }, 
     180  ); 
     181  $engine->run; 
     182 
     183  use Data::Dumper; 
     184  sub handle_request { 
     185      my $c = shift; 
     186      $c->res->body( Dumper($c->req) ); 
     187  } 
    170188 
    171189=head1 DESCRIPTION 
    172190 
    173 HTTP::Engine::Compat is 
     191HTTP::Engine::Compat is version 0.0.12 Compatibility layer of HTTP::Engine. 
     192 
     193The element of Context and Middleware are added to HTTP::Engine. 
     194 
     195=head1 MIDDLEWARES 
     196 
     197For all non-core middlewares (consult #codrepos@freenode first), use the HTTPEx:: 
     198namespace. For example, if you have a plugin module named "HTTPEx::Middleware::Foo", 
     199you could load it as 
     200 
     201  use HTTP::Engine::Compat middlewares => [ qw( +HTTPEx::Plugin::Foo ) ]; 
     202 
     203=head1 METHODS 
     204 
     205=over 4 
     206 
     207=item HTTP::Engine::Compat->load_middleware(middleware) 
     208 
     209=item HTTP::Engine::Compat->load_middlewares(qw/ middleware middleware /) 
     210 
     211Loads the given middleware into the HTTP::Engine. 
     212 
     213=back 
    174214 
    175215=head1 AUTHOR 
    176216 
    177217Tokuhiro Matsuno E<lt>tokuhirom@gmail.comE<gt> 
     218 
     219Kazuhiro Osawa 
    178220 
    179221=head1 SEE ALSO