adimo has asked for the wisdom of the Perl Monks concerning the following question:
Another question is why each time I use the address_of method the return value is different for the same reference. Is there a way to decode this value so I can use it as an hash key ?use Devel::Pointer; my %hash; $hash{1} = 2; my $code = &create(\%hash); print "CODE : ".$code."\n"; my $ref = &extract($code); print "REF : ".$ref."\n"; sub create { my $self = shift; return(address_of($self)); } sub extract { my $self = shift; return(deref($self)); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How do I use Devel::Pointer in different scopes ?
by broquaint (Abbot) on Mar 31, 2002 at 14:25 UTC |