That's not equivalent. If you wanted to use the ternary operator,
defined($foo = $bar->id) or $self->error('blah blah');
would be equivalent to
defined($foo = $bar->id) ? undef : $self->error('blah blah');
$foo = defined($bar->id) || $self->error('blah blah');
would be equivalent to
$foo = defined($bar->id) ? $bar->id : $self->error('blah blah');
but that's not relevant here.
In reply to Re^2: creating operands
by ikegami
in thread creating operands
by pvilleSE
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |