Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
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 ( #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?
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
Node Status?
node history
Node Type: note [id://476826]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (11)
As of 2014-07-29 18:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (225 votes), past polls