Closed ribasushi closed 8 years ago
P.S. good idea otherwise, ++ ;)
Fair point. The difference between inhouse code and "software".
Will fix tomorrow.
Your current fix is fine, but from a performance perspective just producing a raw Storable::nfreeze across the entire bag of values will be much cheaper than what you implemented.
Just a followup thought, functionality-wise the problem is resolved.
Good catch, that's bad form. It happens to work in this particular case so the test passed :)
But since I'll have to touch it again I'll just replace it with nfreeze. Initially I wouldn't trust its representation to be stable, but now I see it's specifically mentioned in the docs.
Right, it's guaranteed stable on the same version of Storable.pm as long as you set local $Storable::canonical = 1;
.
Across various perl/Storable versions the stability is a different story, but that's not a concern in your case.
Cheers!
This is a really fragile way of approaching this. Imagine someone writing an unpacked version of everything on CPAN to a database and comes across the source of your module. OOOOOPS.
Instead use a proper serializer which will account for undefs, and any other weird shit out there (however do not use the module I linked - it's internal with no API guarantees)