Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^3: Can I serialize an object and have it remember it's type?

by tlm (Prior)
on Jul 21, 2005 at 13:39 UTC ( [id://476826]=note: print w/replies, xml ) Need Help??


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

  • Comment on Re^3: Can I serialize an object and have it remember it's type?

Replies are listed 'Best First'.
Re^4: Can I serialize an object and have it remember it's type?
by tphyahoo (Vicar) on Jul 21, 2005 at 13:52 UTC
    Thanks again tlm. As you can see above, I got the thing working with storable. As to the failure with DBM::Deep, I don't think evaling will help here because, if you look at the Dumper output, it's clear that this is getting blessed into a DBM::Deep object, and LWP::UserAgent is never mentioned.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://476826]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (4)
As of 2024-04-25 10:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found