I've been making quite a bit of use of stored data structures as of late. Sometimes storing to file as intermediate conversion results, sometimes storing to data in MySQL tables. The data must be generically recoverable from many different systems (with varying and uncontrollable module versions).

Initially I relied on Data::Dumper to serialize the structures. Later I came to prefer Storable (nstore_fd fd_retrieve). Storable appeared to be a better solution. More compact serialized data, fast de-serialization, no messy eval statetments. It was a good choice.

The other day I applied some updates to my dev machine. Looks like Storable was in the list of updates. Now the data serialized on my dev machine won't de-serialize on the testing machines.

"Storable binary image v2.7 more recent than I am (v2.6)" - bye bye stored data :(

What's the fracking point? What purpose does Storable serve if one can't rely on it to recover the data again? I mean the whole point of storing things is so that you can retrieve them again later for Pete's sake. As it is, I'm not completely committed to Storable and I can switch back to using Data::Dumper with minimum work but this could have easily been a data backup recovery nightmare at some point in the future.

Is Data::Dumper the only truly portable (core) way to serialize data structures?

In reply to Burned by Storable by ruzam

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.