id#

The id of a reference: the number a field hash stores it under.

Synopsis#

use Hash::Util::FieldHash qw(id);
my $id = id($obj);

What you get back#

For a reference, the address of what it points to, as a number - the same value Scalar::Util::refaddr gives. The id stays the object’s for its lifetime. Anything that is not a reference comes back unchanged, where refaddr gives undef.