in reply to Re^2: How to dereference a FORMAT reference?
in thread How to dereference a FORMAT reference?
All I have is a reference and I don't know a general way of going from the reference to the typeglob slot.
What? I thought that the typeglob slots were chosen to match what ref returns (except you'd want Scalar::Util::reftype because of the unfortunate decision to overload ref to returning class names and you have to deal with just a few special cases like the unfortunate and silly decision to have ref(\\$x) return "REF" instead of "SCALAR" and the more reasonable features of returning "LVALUE" or "VSTRING" instead of "SCALAR").
I don't see how having to deal with 3 special cases prevents this from being a "general" solution.
Updated with minor wording changes.
- tye
|
|---|