That doesn't work here. Your solution eliminates short-circuiting. Short-circuiting is crucial here since we only want $self->error() to execute when the LHS is undefined. Without short-circuiting, $self->error() will be called unconditionally.
Short-circuiting is not even a bonus in the provided snippet. The OP uses or/definedor exclusively for its short-circuiting properties, since the return value of the or/definedor is discarded.
In reply to Re^2: creating operands
by ikegami
in thread creating operands
by pvilleSE
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |