Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Midleading plack_middlewares documentation #844

Closed
berekuk opened this Issue · 1 comment

1 participant

@berekuk

Dancer::Cookbook implicitly suggests that middleware arguments should be enclosed in []:

    set plack_middlewares => [
        [ 'Debug' => [ 'panels' => [qw(DBITrace Memory Timer)] ] ],
    ];

But the actual code passes its arguments to add_middleware, and Plack::Builder expects a list, not arrayref.

@berekuk

Looks like it's a dup of #760. Sorry.

@berekuk berekuk closed this
@pjf pjf referenced this issue from a commit in pjf/Dancer
@pjf pjf Fix Bug #844/#760 - Misleading plack middleware documentation
The Plack middlware interface expects an array of arrays, where
the first element of each one is the middleware name, and the rest
are the arguments to that middleware.  The Cookbook suggests a
name and array-reference is required.

This change adjusts the data structures used appropriately (both
in code and in YAML).

Tested against Dancer 1.3095 and Plack 0.9988
8255b66
@pjf pjf referenced this issue from a commit in pjf/Dancer
@pjf pjf Fix Bug #844/#760 - Misleading plack middleware documentation
The Plack middlware interface expects an array of arrays, where
the first element of each one is the middleware name, and the rest
are the arguments to that middleware.  The Cookbook suggests a
name and array-reference is required.

This change adjusts the data structures used appropriately (both
in code and in YAML).

Tested against Dancer 1.3095 and Plack 0.9988
1700f6e
@xsawyerx xsawyerx referenced this issue from a commit
@pjf pjf Fix Bug #844/#760 - Misleading plack middleware documentation
The Plack middlware interface expects an array of arrays, where
the first element of each one is the middleware name, and the rest
are the arguments to that middleware.  The Cookbook suggests a
name and array-reference is required.

This change adjusts the data structures used appropriately (both
in code and in YAML).

Tested against Dancer 1.3095 and Plack 0.9988
e8f8288
@mokko mokko referenced this issue from a commit in mokko/Dancer
@pjf pjf Fix Bug #844/#760 - Misleading plack middleware documentation
The Plack middlware interface expects an array of arrays, where
the first element of each one is the middleware name, and the rest
are the arguments to that middleware.  The Cookbook suggests a
name and array-reference is required.

This change adjusts the data structures used appropriately (both
in code and in YAML).

Tested against Dancer 1.3095 and Plack 0.9988
881506f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.