Beefy Boxes and Bandwidth Generously Provided by pair Networks Cowboy Neal with Hat
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

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

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

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


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 09: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
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.