Skip to content
Browse files

noted reverse

  • Loading branch information...
1 parent 3303f71 commit 50d257765bd7c7d226cd43624777f2cf0f4a3112 @jjn1056 committed Apr 6, 2012
Showing with 19 additions and 5 deletions.
  1. +10 −3 README.mkdn
  2. +9 −2 lib/Catalyst/Plugin/EnableMiddleware.pm
View
13 README.mkdn
@@ -118,14 +118,14 @@ doesn't preclude the other.
# CONFIGURATION
-Configuration for this plugin should be a hashref under the top level key
+Configuration for this plugin should be a ArrayRef under the top level key
`Plugin::EnableMiddleware`, as in the following:
__PACKAGE__->config(
'Plugin::EnableMiddleware', \@middleware);
-Where `@middleware` is one or more of the following, applied in the order
-listed:
+Where `@middleware` is one or more of the following, applied in the REVERSE of
+the order listed (to make it function similarly to [Plack::Builder](http://search.cpan.org/perldoc?Plack::Builder):
- Middleware Object
@@ -189,6 +189,13 @@ to initialize the middleware object.
'Session' => {store => 'File'},
]);
+# VERSION NOTES
+
+Versions prior to `0.006` applied middleware in the order lists. This led to
+unexpected problems when porting over middleware from [Plack::Builder](http://search.cpan.org/perldoc?Plack::Builder) since
+that applies middleware in reverse order. This change makes this plugin behave
+as you might expect.
+
# AUTHOR
John Napiorkowski [email:jjnapiork@cpan.org](email:jjnapiork@cpan.org)
View
11 lib/Catalyst/Plugin/EnableMiddleware.pm
@@ -178,8 +178,8 @@ C<Plugin::EnableMiddleware>, as in the following:
__PACKAGE__->config(
'Plugin::EnableMiddleware', \@middleware);
-Where C<@middleware> is one or more of the following, applied in the order
-listed:
+Where C<@middleware> is one or more of the following, applied in the REVERSE of
+the order listed (to make it function similarly to L<Plack::Builder>:
=over4
@@ -244,6 +244,13 @@ to initialize the middleware object.
=cut
+=head1 VERSION NOTES
+
+Versions prior to C<0.006> applied middleware in the order lists. This led to
+unexpected problems when porting over middleware from L<Plack::Builder> since
+that applies middleware in reverse order. This change makes this plugin behave
+as you might expect.
+
=head1 AUTHOR
John Napiorkowski L<email:jjnapiork@cpan.org>

0 comments on commit 50d2577

Please sign in to comment.
Something went wrong with that request. Please try again.