-
Notifications
You must be signed in to change notification settings - Fork 576
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fall back to normal constructor if hash style arguments are provided #1348
Conversation
As discussed on IRC we should probably either add a deprecation notice to this or change clone and the test back to use the constructor arguments instead of the setter. I prefer the latter. |
What are the use cases for this feature? (Can't check right now, but i'm fairly sure we have no constructors yet that extend the |
@kraih We do have a lot of constructors with special behavior for single argument. Like
|
My main concern is maintaining backwards compat, so I'm fine with adding this with a deprecation notice as well to avoid breakage until upstreams have had time to adjust. |
@marcusramberg That's not the same at all. There is no attribute handling in |
What's the status of this? Downstream modules are still broken in the meantime :( |
I'm 👍 on merging this, but maybe we should probably also add a deprecation warning at the same time if the |
@marcusramberg Could you add a deprecation notice to the PR? |
237c593
to
03c7422
Compare
@Grinnz done. @mojolicious/core can we have a couple of more votes? |
03c7422
to
f2a9e80
Compare
Summary
Fall back to old behavior if more than one argument or hashref is given as argument
Motivation
Maintain old behavior
References
As discussed on IRC.