Reading the code for it, it looks like it can't return q{}. If ref returns the empty string, reftype returns undef. Otherwise, it looks like it gives one of the underlying types. Looks like blessing into the empty string will still slip past reftype. (Bug or feature? You make the call...)
-xdg
Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.
In reply to Re^3: Why reftype and blessed are making my life harder than it needs to be
by xdg
in thread Why reftype and blessed are making my life harder than it needs to be
by dragonchild
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |