As I said, I tend to think of it as a boolean -- largely because I only use it in situations when I'm pretty sure I won't be blessing objects into "0" or "\0".
Interestingly, reftype only checks the length of ref, which is why it can probably be fooled by "\0".
-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: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |