- Documentation corrections for Util methods around localized PSGI $env.
- Improvements to auto detection of terminal width.
- Updating deprecation list to include Class::Load and ensure_class_loaded
+ - Added a few docs around middleware and corrected the order that middleware
+ is loaded when registering it via ->setup_middleware instead of via
+ configuration.
+ - Added a test case to make sure default middleware order is correct.
s
5.90062 - 2014-04-14
- HTTP::Exception objects were not properly bubbled up to middleware since
experience with L<Plack::Builder> or if you previously used the plugin
L<Catalyst::Plugin::EnableMiddleware> (which is now considered deprecated)
+So basically your middleware handles an incoming request from the first
+registered middleware, down and handles the response from the last middleware
+up.
+
=cut
sub registered_middlewares {
sub setup_middleware {
my $class = shift;
my @middleware_definitions = @_ ?
- @_ : reverse(@{$class->config->{'psgi_middleware'}||[]});
+ reverse(@_) : reverse(@{$class->config->{'psgi_middleware'}||[]});
my @middleware = ();
while(my $next = shift(@middleware_definitions)) {