in reply to Re: Re: Need a module for persistence of dynamic objects
in thread Need a module for persistence of dynamic objects

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

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