refaddr() is used to be entirely agnostic about the bless status of an object.
Speaking of which (and I'm replying to you but ideally to all those who kindly answered my question, whom I thank), I was thinking that perhaps it would be nice if standard ref, just like so many functions, returned something different in list context, i.e. something like: REF, ADDR, BLESSED, where
- REF would be ref()'s current output if the reference is not blessed, and if it is then the same as if it were not,
- ADDR the same as refaddr()'s and
- BLESSED the package the reference is blessed in, if it is, or undef otherwise.
But I suppose that such a beast would risk of breaking too much existing code...