-
Notifications
You must be signed in to change notification settings - Fork 22
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
Switch to Types::Serialiser booleans #37
base: master
Are you sure you want to change the base?
Conversation
This change promotes type compatibility with other CPAN serialization modules like JSON. BREAKING CHANGE: removes stringification of true() to "true" and false() to "false". As the packages Data::MessagePack::Boolean and Types::Serialiser::Boolean are aliased, it is not safe to include this controverse coertion (different modules may have different ideas on what is a useful stringification of booleans). The "bool" and "num" (0+) overloads should work as before.
@aferreira How does this compare to #34? |
@FGasper I took a lazier route to achieve interoperability – namely instead of also supporting Types::Serialiser::Boolean, the proposed change makes "Data::MessagePack::Boolean" and "Types::Serialiser::Boolean" the same for Perl. So the assertions below will hold. A consequence of this approach is that the required change was simpler – no need for patches to XS code or adding explanation on the tolerance of Types::Serialiser::Boolean to documentation.
|
To my knowledge #34 doesn’t include any breaking changes, so I’d think that would still be a preferable solution—notwithstanding my own bias. :) Anyway, I think it’s moot until someone else assumes stewardship of the module. |
In the meantime there is a (very ugly) workaround solution here: https://metacpan.org/source/FELIPE/Net-WAMP-0.01/lib/Net/WAMP/Serialization/msgpack.pm |
Thanks. Given that the owner is unresponsive, any ideas on what would be the next steps to get the PR merged to master and released to CPAN? |
This change promotes type compatibility with other
CPAN serialization modules like JSON.
This is another take at #17 – see also #34
BREAKING CHANGE: removes stringification of true()
to "true" and false() to "false". As the packages
Data::MessagePack::Boolean and Types::Serialiser::Boolean
are aliased, it is not safe to include this controverse
coertion (different modules may have different ideas
on what is a useful stringification of booleans).
The "bool" and "num" (0+) overloads should work as before.