in reply to Need a module for persistence of dynamic objects

Monks,

Thanks for all your input on this topic. Storable has certainly solved my initial requirements.

The next challenge is that one of my structures contains coderefs. This could prove interesting. :-)

rW

  • Comment on Re: Need a module for persistence of dynamic objects

Replies are listed 'Best First'.
Re: Re: Need a module for persistence of dynamic objects
by princepawn (Parson) on Feb 17, 2002 at 13:09 UTC
    The next challenge is that one of my structures contains coderefs. This could prove interesting. :-)
    Can you turn those coderefs into methods and simply rebless and object into resurrection?

      princepawn wrote:
      > Can you turn those coderefs into methods and simply rebless and object into resurrection?

      In this instance, no (nice idea though :-)). The coderefs here are closures containing info private to the object. Hence they do not want to be available to other objects in the same class.

      I have a workaround, based on keeping a scalar alongside the coderef, which holds the code in string form. These are kept together in a code object. I am using storeable's STORABLE_freeze and STORABLE_thaw hooks to provide my own serialisation of said objects. This is working fine.

      I am tempted to publish when I have some complete, working code.

      rW