|Keep It Simple, Stupid
RE: undefs and functionsby dlux (Initiate)
|on Aug 02, 2000 at 11:05 UTC
I think Ithe most elegant solution is the eval so far. (Thanks for the other suggestions!) But I think I will combine the results of the suggestions, and will come up with a new Class, which will be returned if an undefined or nonexistent hash key has been found. So I will do module like this:
Every time I need to return an undef I will return "new TableMap::Undef". This object is treated as undef as bool and numeric value, so this will cause right results when we test the value. This problem wuold be solved with a new perl pseudo-variable, we can call it $LAST for example, this is the value of the last similar level tag in the current expression. For example, I want to do things like this:
What do you think about it? Will it be a good feature request in perl6?