good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re^2: The trap of reference numificationby friedo (Prior) |
on Nov 11, 2005 at 19:21 UTC ( [id://507839]=note: print w/replies, xml ) | Need Help?? |
In my experience object IDs almost always use the stringified reference as a hash key (the usual way for inside-out objects.) Or Scalar::Util::refaddr is used (as in Class::Std and PBP.)
refaddr returns the numified reference, but Scalar::Util already turns warnings off when munging that. (And SU does it in a rather bizarre way with a regex and hex instead of using direct numification for reasons that remain mysterious to me.) I don't think there are many common uses of numified references outside those two contexts. Update: Actually it looks like the issue with refaddr is fixed in recent versions. It uses int now.
In Section
Meditations
|
|