in reply to Re: use Data::Dumper to implement Object persistence
in thread (DON'T) use Data::Dumper to implement Object persistence

Here's a plug for my favorite serialization technique: YAML. It's not as fast as storable, but it's human readable (like D::D) and doesn't suffer from the security problems that evaling D::D has. And it's cross-platform; there are parsers and dumpers available for Python, PHP, C and Java.

I had a job a couple years ago where we needed to share objects between some in-house mod_perl stuff, some third-party PHP stuff, and some Python stuff from a company we acquired. YAML made this trivial.

  • Comment on Re^2: use Data::Dumper to implement Object persistence

Replies are listed 'Best First'.
Re^3: use Data::Dumper to implement Object persistence
by IOrdy (Friar) on Apr 28, 2005 at 03:33 UTC
    OT but I dont see a C parser for YAML listed on the yaml.org website. If you know of one could you point it out please.
      I see no C parser for Data::Dumper's output either (other than perl itself!) and no C parser for Storable's output that is independent of perl either. But then, those don't really make any claim to be anything other than intimately tied to perl.

      YAML's lack of support in so many languages is, in my opinion, its biggest weakness. The lack of VB and C# implementations in particular is a Very Bad Thing. It's Very Bad because it makes XML the next best choice, and XML is Hateful.

        Ah yes, the Vapourware .NET YAML implementation has been languishing on the disc drive of my laptop since last August. It still does little more than split the input into separate YAML "documents", I really should pick up on it again - I'm in danger of becoming a one person sourceforge of unfinished projects

        /J\