Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^2: The number of references to a variable

by cdarke (Prior)
on Nov 26, 2007 at 13:12 UTC ( [id://652974]=note: print w/replies, xml ) Need Help??


in reply to Re: The number of references to a variable
in thread The number of references to a variable

SvREFCNT is exposed in Devel::Peek (no need to go to CPAN), which is a bit easier to use than embedding XS. For example:
use Devel::Peek qw(SvREFCNT); $x = 42; $y = \$x; $refs_for_x = SvREFCNT($x); print "$refs_for_x\n";
Prints 2.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (3)
As of 2024-04-20 15:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found