You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In a discussion on plugins (#599), we raised the idea of using a Plack::Builder all the time, and then allow plugins to add middlewares.
I know exactly how I want to implement it, in this case:
Have a Builder attribute and add handles to the add_middleware method and have that available in the DSL.
This is a two part process. This issue is the first one. I'm opening another issue for the second one.
@xsawyerx I'd been thinking about something similar (as a result of working on #590).
If you are considering only adding middleware, as in $builder->wrap($psgi_coderef) (which can be done without a Plack::Builder object), or did you have in mind being able to use other parts of the Plack::Builder API, such as possibly having a plugin mount another psgi app ?
Agreed with @veryrusty, while we are at it, we could provide a full access to the $builder, provided it offers a sane and easy to use interface (not familiar with Plack::Builder)
One thing I'm afraid of is getting back to the plack_middlewares option from D1. I don't want people to build their PSGI app in Dancer. I want them to add Dancer to a PSGI app they're building.
The difference in this issue is that it raises the option of allowing developers (specifically plugin developers) to add middlewares, rather than allow users to add middlewares.
Renewed position: Middlewares are not application level and we shouldn't confuse them. Closing this issue. IF someone still sees this as a valued enhancement, please reopen.
Activity
veryrusty commentedon Jun 4, 2014
@xsawyerx I'd been thinking about something similar (as a result of working on #590).
If you are considering only adding middleware, as in
$builder->wrap($psgi_coderef)(which can be done without aPlack::Builderobject), or did you have in mind being able to use other parts of thePlack::BuilderAPI, such as possibly having a pluginmountanother psgi app ?dams commentedon Jun 4, 2014
Agreed with @veryrusty, while we are at it, we could provide a full access to the $builder, provided it offers a sane and easy to use interface (not familiar with Plack::Builder)
xsawyerx commentedon Jun 7, 2014
One thing I'm afraid of is getting back to the
plack_middlewaresoption from D1. I don't want people to build their PSGI app in Dancer. I want them to add Dancer to a PSGI app they're building.The difference in this issue is that it raises the option of allowing developers (specifically plugin developers) to add middlewares, rather than allow users to add middlewares.
xsawyerx commentedon Sep 20, 2016
Renewed position: Middlewares are not application level and we shouldn't confuse them. Closing this issue. IF someone still sees this as a valued enhancement, please reopen.
Thanks!