lucy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marvin Humphrey <mar...@rectangular.com>
Subject Re: [lucy-user] Serialization error when inheriting from Lucy::Analysis::Normalizer
Date Mon, 05 May 2014 16:16:54 GMT
Hi,

On Mon, May 5, 2014 at 7:58 AM, Knut Arne Bjørndal
<knut.arne.bjorndal@easyconnect.no> wrote:

> Minimal test case:

Thanks for providing the test case!  It allowed me to isolated the problem
right away -- here's a quick fix:

https://github.com/rectang/lucy/commit/91b7a5fde2e18370c81a9189591fa25b36b3e963

> So it looks like the serializer doesn't correctly handle boolean values
> when called from perl?

Round-trip serialization of booleans is tricky for languages like Perl which
don't provide a dedicated boolean type.  We can probably make some general
improvements on that front, but in any case it's better for client code like
Normalizer#Load to be forgiving and call To_Bool() on whatever object is
present rather than insist on a specific boolean type.

Marvin Humphrey

Mime
View raw message