Martin J. Evans wrote:
As a result, I'm not pushing this in any way. It would seem the idea in DBI of saying this column is an integer so I want it as an integer looks ok on the surface until the numbers get large when things get rather inconsistent. Not really wishing to complicate this anymore I note that some other modules that have to deal with big numbers turn them into Math::BigInt (from what I remember not being near my notes now) objects.

Right. Rose::DB uses Math::BigInt (and so does my current project) nearly transparently. The only little annoyance is that Math::BigInt and JSON::XS don't "know" each other, i.e. JSON::XS usually refuses to serialise Math::BigInt objects or creates a Dump of the Math::BigInt internals. Luckily, all you need is a single line of code, and you have to enable the convert_blessed flag in JSON::XS.

*Math::BigInt::TO_JSON=\&Math::BigInt::bstr;

Alexander

Reply via email to