in reply to Portable datastore formats in core perl?

My understanding is that Storables are not necessarily portable between machines, even when using nstore.

Care to elaborate on that. What have you heard and where?

There are going to be some situations where portability isn't possible.

  1. Data packed with the latest version probably won't be portable to a machine running an ancient version.

    As perl (and the rest of the world) have adapted to new requirements (unicode for example), those adaptations inevitably break backwards compatibility. But ditto for any transfer format pre- and post-unicode support.

    If you use newer features--like coderefs; then portability will be restricted by the features used by that code. say won't work pre-5.10.x; but neither will Java5 code compile on a Java3 compiler.

  2. 64-bit integers won't port to a 32-bit machine.

    But even a text format file will have this problem. A 32-bit machine will bottle out trying to read a > 32-bit integer, even if it is formatted as text.

  3. The target machines will need to have the appropriate modules to support stored blessed refs.

    This wil be the same whether you use Storable, Yaml, or Data::Dumper.

Often the solution to these types of problems is to consider what your portability requirements actually are, rather than seeking "universal portability". It's often a variation on YAGNI.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
RIP an inspiration; A true Folk's Guy
  • Comment on Re: Portable datastore formats in core perl?