However, I don’t yet see why generating a semantics for normal CODE refs would be so difficult.
It's probably easier to start from the other side. With the things that Storable can handle such as, say, a HASH or ARRAY reference it is simple to dereference those things in order to determine the actual value of this things - this can be of varying degrees of difficulty depending on how nested the structured might be, but it is simple to see that given a HASH reference in $foo we can determine the structure of that object and obtain the values of the data therein - this can then be easily represented in serialization in such a way that the same data structure can be recreated on deserialization.
However, given a CODE reference the action of dereferencing does not give us information that would allow us to recreate the original subroutine: it performs the action that the subroutine was designed to do - this clearly cannot be represented in some datastructure by Storable.
Update: That said you might be interested to see This post in p5p
/J\
In reply to Re: Serializing CODE References
by gellyfish
in thread Serializing CODE References
by djantzen
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |