http://www.perlmonks.org?node_id=476826


in reply to Re^2: Can I serialize an object and have it remember it's type?
in thread Can I serialize an object and have it remember it's type?

Evaling didn't work in this case...

How exactly did it fail? Does the error go away if you precede the eval'ing with my $VAR1;?

I'm going to try serializing and evaling with Storable now.

With Storable explicit eval'ing is not required; just use its store and retrieve functions.

Update: Gah! I entirely missed that in the serialization string the blessing had the wrong class. As tphyahoo kindly points out, no amount of eval-ing will fix this.

the lowliest monk