Commits


José Joaquín Atria authored and GitHub committed 82d864fd375
AVRO-1521 [Perl] Fix boolean encoding errors (#2986) This change fixes a long-standing issue with the binary encoding of boolean values. In particular, that while several "smart" values were accepted as valid boolean values by Avro::Schema (eg. "true" and "no"), Avro::BinaryEncoder encoded them as true or false depending on their truth value for Perl. This resulted in both of those examples being encoded as true, because for Perl any non-empty string is true. This change makes it so that those values are accepted and properly handled, and handles other values that represent boolean values like JSON::PP::Boolean references and native Perl booleans (those that would be returned by eg. builtin::true). This also includes a small but possibly breaking bugfix for the detection of valid boolean values in Avro::Schema, which was using a non-anchored regular expression to filter values, meaning that eg. any value that had an "n" anywhere would be considered valid. This was most likely an involuntary error, so while breaking, it feels like we have to fix it.