This is just plain bad advice. This is like the commonly used analogy of turning up the radio so you can't hear the nasty noises your engine is making.
The message is telling you something useful, like you are probably attempting to use a result that is coming back as undefined. The correct answer would be to modify your code to catch this case and recover gracefully; Not turn up the radio so you can't hear the noise. | [reply] |
I'm '--'ing this node, a rare event for me, for two reasons. First, taking out "use strict" is a bad idea to begin with. Second, try this:
% perl -e 'sub foo { return undef; } print foo()->{"fish"}{"head"}'
Can't use an undefined value as a HASH reference at -e line 1.
That's with strict turned off.
So not only is the advice bad, but the solution won't work. Nothing personal to mbond, but that sorta reduces the value of the node. ;)
stephen
| [reply] [d/l] |