Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the MongoDB CPAN distribution.

Maintainer(s)' notes

Please don't report bugs here. Please use the MongoDB Perl driver issue tracker instead.

Report information
The Basics
Id: 69698
Status: resolved
Priority: 0/
Queue: MongoDB

People
Owner: Nobody in particular
Requestors: jettero [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.43
Fixed in: (no value)



Subject: please also add MongoDB::BSON::BinData
Extremely happy to have better perlish support for numbers in MongoDB!! Could I also get a binary data type? I have a really hard time with scalar refs. I posted a comment about that back in the number ticket, which I think needn't be reproduced here. https://rt.cpan.org/Ticket/Display.html?id=67336#txn-954671 There are actually two problems. First scalar refs is a clumsy way to handle that (::BinData will be better). It should probably work correctly though and I don't think it does in the current implementation. Perhaps I should open a bug report for that. -- If riding in an airplane is flying, then riding in a boat is swimming. 116 jumps, 48.6 minutes of freefall, 92.9 freefall miles.
Yes, if you have any examples of it not working correctly, that would be extremely helpful. On Fri Jul 22 14:01:19 2011, JETTERO wrote: Show quoted text
> Extremely happy to have better perlish support for numbers in > MongoDB!! > > Could I also get a binary data type? I have a really hard time with > scalar refs. I posted a > comment about that back in the number ticket, which I think needn't be > reproduced here. > > https://rt.cpan.org/Ticket/Display.html?id=67336#txn-954671 > > There are actually two problems. First scalar refs is a clumsy way to > handle that (::BinData > will be better). It should probably work correctly though and I > don't think it does in the > current implementation. Perhaps I should open a bug report for that. > >
On Fri Jul 22 15:32:54 2011, KRISTINA wrote: Show quoted text
> Yes, if you have any examples of it not working correctly, that would be > extremely helpful.
It's tricky to reproduce, but I'll try to come up with something. -- If riding in an airplane is flying, then riding in a boat is swimming. 116 jumps, 48.6 minutes of freefall, 92.9 freefall miles.
Added, will be in 0.46 (https://github.com/mongodb/mongo-perl-driver/commit/ae655b8ddc82639be1c292d428b6be4a01db6225 and https://github.com/mongodb/mongo-perl-driver/commit/4c7995eec206b358f207ddee33e8b06f018dfeb2). See documentation in https://github.com/mongodb/mongo-perl-driver/blob/master/lib/MongoDB/BSON/Binary.pm and https://github.com/mongodb/mongo-perl-driver/blob/master/lib/MongoDB/DataTypes.pod (under "Binary Data"). I think I know why you were having trouble saving binary data as string refs: it doesn't round-trip correctly (it becomes a normal string, not a string ref, on deserialization). Set the MongoDB::BSON::use_binary flag to use MongoDB::BSON::Binary from now on.