in reply to Re^4: A Scalar::Util::refaddr Oddity
in thread A Scalar::Util::refaddr Oddity

Anyway, after reblessing the object, wouldn't it be better to take the reference in numeric context than to extract the number from the string form?

True, although I've no idea off the top of my head whether that behaviour has always been in Perl so there may be issues with the perl versions that Scalar::Util supports.

Replies are listed 'Best First'.
Re^6: A Scalar::Util::refaddr Oddity
by ambrus (Abbot) on Sep 27, 2005 at 13:20 UTC
    You might be right... the phrase
    Using a reference as a number produces an integer representing its storage location in memory. The only useful thing to be done with this is to compare two references numerically to see whether they refer to the same location.
    has got into perlref between 5.005 and 5.6.0. The feature might have been there from the start though.