in reply to Reference Count
I'm amazed that no one else mentioned the B module to you. All your scalar references will return the REFCNT number from the referenced scalar. I provided an example - this is a dirt easy task.
use B 'svref_2object'; my $something = "this is tadman's cached data"; my $something_obj = svref_2object(\$something); my $something_refcnt = $something_obj->REFCNT;
__SIG__ use B; printf "You are here %08x\n", unpack "L!", unpack "P4", pack "L!", B::svref_2object(sub{})->OUTSIDE;
|
|---|