in reply to Re: Why reftype and blessed are making my life harder than it needs to be
in thread Why reftype and blessed are making my life harder than it needs to be
blessed() isn't a boolean because package names may be false: "" or "0". If you want a boolean, check for defined( blessed( ... ) ) instead. That's why blessed() returns undef on non-blessed: the "false" value of ref() is actually a valid true value.
bless( ..., "\0" ); # "" bless( ..., 0 ); # "0"
⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Why reftype and blessed are making my life harder than it needs to be
by xdg (Monsignor) on Feb 10, 2006 at 12:35 UTC | |
by demerphq (Chancellor) on Feb 10, 2006 at 13:55 UTC | |
by dragonchild (Archbishop) on Feb 10, 2006 at 14:13 UTC | |
by demerphq (Chancellor) on Feb 10, 2006 at 14:22 UTC | |
by dragonchild (Archbishop) on Feb 10, 2006 at 14:27 UTC | |
|