Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: The number of references to a variable

by Somni (Friar)
on Nov 27, 2007 at 13:34 UTC ( [id://653216]=note: print w/replies, xml ) Need Help??


in reply to The number of references to a variable

As has been mentioned, Devel::Peek provides an SvREFCNT. There's also a builtin function (probably undocumented) called Internals::SvREFCNT.

Your statement:

I only want to use those objects which are referenced
didn't make a lot of sense, however. The only objects you have access to are those with references to them; if there are no references to an object then it is deallocated. Therefore, any refcount check would be guaranteed to be over 0.

I simply wanted to point that out; perhaps it was just a miscommunication. If weaken was what you were looking for, great.

  • Comment on Re: The number of references to a variable

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2024-04-24 18:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found