Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: How to recover a reference from a stringified reference?

by knobunc (Pilgrim)
on Mar 21, 2002 at 15:11 UTC ( [id://153333]=note: print w/replies, xml ) Need Help??


in reply to How to recover a reference from a stringified reference?

The problem with doing this is that it bypasses perl's reference-counting memory management scheme. If you could ref-ify a stringified ref, you'd be getting a new reference to something without incrementing that thing's reference count. That means you could still have "live" references to an object which perl has already deallocated due to its reference count reaching zero.

Now that you know all that, if you really still want to reconstitute a reference from a string (and have no fear of the potentially nasty consequences) try the Devel::Pointer module.

See this post by Ovid for more information on references.

  • Comment on Re: How to recover a reference from a stringified reference?

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2024-04-24 02:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found