Subject: | Scalar::Util::refaddr instead of int() |
I think it's better to use Scalar::Util::refaddr instead of
$address = int $item;
The latter can be wrong if a class overloaded 0+ or int.
A sample script:
#!perl
use strict;
use warnings;
use Data::Walk;
use bigint;
my $obj = {
a1 => 123,
b1 => 456,
};
walk { wanted => sub { warn $Data::Walk::address if defined
$Data::Walk::address } }, $obj;
__END__
Regards,
Slaven