Permalink
Browse files

oops

  • Loading branch information...
1 parent 2583707 commit e28a259cb7be1e9c0faffec1ebe101b1e315996c @dann committed Sep 8, 2009
Showing with 5 additions and 7 deletions.
  1. +1 −1 angelos-core/lib/Angelos.pm
  2. +4 −6 angelos-core/lib/Angelos/Middleware/Builder.pm
View
2 angelos-core/lib/Angelos.pm
@@ -290,7 +290,7 @@ sub res {
}
sub psgi_adapter {
- 'Angelos::PSGI::Adapter';
+ '+Angelos::PSGI::Adapter';
}
__END_OF_CLASS__
View
10 angelos-core/lib/Angelos/Middleware/Builder.pm
@@ -1,6 +1,5 @@
package Angelos::Middleware::Builder;
-use Angelos::Class;
-use HTTP::Engine::Middleware;
+use Mouse;
use UNIVERSAL::require;
use Angelos::Config;
use Angelos::Exceptions;
@@ -19,16 +18,15 @@ sub build {
sub _build_request_handler {
my ( $class, $application_request_handler, $middlewares ) = @_;
- my $mw = HTTP::Engine::Middleware->new;
for my $middleware ( @{$middlewares} ) {
my $middleware_name
= $class->resovle_middleware_name( $middleware->{module} );
my $config = $middleware->{config} || {};
- $mw->install( $middleware_name => $config );
+ Mouse::load_class($middleware_name);
+ $middleware_name->new($config);
}
- $mw->handler($application_request_handler);
}
sub resovle_middleware_name {
@@ -48,7 +46,7 @@ sub _get_middlewares {
$self->config->middlewares;
}
-__END_OF_CLASS__
+1;
__END__

0 comments on commit e28a259

Please sign in to comment.