- Timestamp:
- 11/03/08 15:13:27 (5 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
lang/perl/mobirc/trunk/lib/App/Mobirc/Plugin/Component/HTTPD.pm
r18451 r22616 10 10 use App::Mobirc::Web::Middleware::Encoding; 11 11 use App::Mobirc::Web::Middleware::MobileAgent; 12 13 use UNIVERSAL::require; 12 14 13 15 has address => ( … … 23 25 ); 24 26 27 has middlewares => ( 28 is => 'ro', 29 isa => 'ArrayRef', 30 default => sub { [] }, 31 ); 32 25 33 hook run_component => sub { 26 34 my ( $self, $global_context ) = @_; 35 36 my $request_handler = App::Mobirc::Web::Middleware::Encoding->wrap( \&App::Mobirc::Web::Handler::handler ); 37 for my $mw ( @{ $self->middlewares } ) { 38 $mw->require or die $@; 39 $request_handler = $mw->wrap($request_handler); 40 } 27 41 28 42 HTTP::Engine->new( … … 34 48 alias => 'mobirc_httpd', 35 49 }, 36 request_handler => App::Mobirc::Web::Middleware::Encoding->wrap( \&App::Mobirc::Web::Handler::handler ),50 request_handler => $request_handler, 37 51 } 38 52 )->run;
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)