Sam Tregar writes: > > On Tue, 2 Nov 1999, Ilya Zakharevich wrote: > > > The answer is YES: one needs different marshalling code, but this does > > not mean that one needs different unmarshalling code! How one would > > write a "universal" unmarshaller? Obviously, one needs to store > > unmarshalling instructions together with stringified data. > > Like Data::Dumper does? Or am I missing a subtle distinction? I've used > Data::Dumper for marshalling, and then used eval() for unmarshalling! Data::Dumper is not designed to do marshalling. You *can* do marshalling with Data::Dumper, but I do not think anyone in a sane mind would do unmarshalling with eval. (Except maybe those cases which involve human editing between marshalling and unmarshalling.) Moreover, AFAIK Data::Dumper does not store unmarshalling instructions with the output. You need to *know* that the strings needs to be evaled. This is pretty bad. Say, FreezeThaw includes 4-byte signature at the start of marshalled text, so one can determined that a string is marshalled with FreezeThaw. Do not know whether Storable does anything similar. IlyaThread Previous | Thread Next