Just another Perl shrine | |
PerlMonks |
Can I serialize an object and have it remember it's type?by tphyahoo (Vicar) |
on Jul 21, 2005 at 13:13 UTC ( [id://476806]=perlquestion: print w/replies, xml ) | Need Help?? |
tphyahoo has asked for the wisdom of the Perl Monks concerning the following question:
Is there a way to serialize an object in such a way that when I retrieve it later it remembers what "type" it was blessed into?
I tried to do this with DBM::Deep, but as you see, no dice. Output of test.pl 2>>test.pl and then test.pl >>test.pl This is sort of a followup to How's mldbm with concurrency?, where I was doing serialization with mldbm. I wound up switching to DBM::Deep on merlyn's advice, but that was before it occurred to me I might be checking for what kind of object I pulled out. ********** UPDATE: I think chromatic's Object Serialization Basics is a good place to learn how to do this.
Back to
Seekers of Perl Wisdom
|
|