Simple, modern, robust, transparent persistence of data structures for Perl

前端 未结 3 2202
囚心锁ツ
囚心锁ツ 2021-02-20 01:52

I\'m looking for a solution to transparently persist Perl data structures (not even objects, but object support would be a plus) without circular references. I don\'t c

3条回答
  •  忘掉有多难
    2021-02-20 02:17

    To achieve your "transparency" goal, you're going to have to either abstract it into a framework (as chambwez suggested) or use tied variables which will save themselves to disk whenever they're updated. DBM hashes use tie in this way, so DBM::Deep is probably your best bet; everything else I'm aware of requires you to explicitly tell it when to write data out and/or caches writes in the name of performance.

提交回复
热议问题