Many would find that better expressed as:
sub done { my $self = shift; return 1 unless $self->foo or $self->bar; return; }
because it avoids the two negations which confuse the meaning of the and.
I used to avoid using unless, partly because none of the other languages I've used have had such a thing, but where it drops out a layer of negation I find it helps clean up intent quite nicely.
In reply to Re^2: Burned by precedence rules
by GrandFather
in thread Burned by precedence rules
by vrk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |