- Timestamp:
- 08/13/08 16:06:43 (5 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
lang/perl/HTTP-Engine-Compat/trunk/lib/HTTP/Engine/Compat.pm
r17569 r17573 1 1 package HTTP::Engine::Compat; 2 2 use Moose; 3 use 5.00800;4 3 our $VERSION = '0.01'; 5 4 6 extends 'HTTP::Engine';5 #extends 'HTTP::Engine'; 7 6 use HTTP::Engine; 8 7 use HTTP::Engine::RequestProcessor; … … 161 160 =encoding utf8 162 161 162 =for stopwords middlewares Middleware middleware nothingmuch kan 163 163 164 =head1 NAME 164 165 165 HTTP::Engine::Compat - 166 HTTP::Engine::Compat - version 0.0.12 Compatibility layer of HTTP::Engine 166 167 167 168 =head1 SYNOPSIS 168 169 169 170 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 } 170 188 171 189 =head1 DESCRIPTION 172 190 173 HTTP::Engine::Compat is 191 HTTP::Engine::Compat is version 0.0.12 Compatibility layer of HTTP::Engine. 192 193 The element of Context and Middleware are added to HTTP::Engine. 194 195 =head1 MIDDLEWARES 196 197 For all non-core middlewares (consult #codrepos@freenode first), use the HTTPEx:: 198 namespace. For example, if you have a plugin module named "HTTPEx::Middleware::Foo", 199 you 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 211 Loads the given middleware into the HTTP::Engine. 212 213 =back 174 214 175 215 =head1 AUTHOR 176 216 177 217 Tokuhiro Matsuno E<lt>tokuhirom@gmail.comE<gt> 218 219 Kazuhiro Osawa 178 220 179 221 =head1 SEE ALSO
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)