Switch to Types::Serialiser booleans#37
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.