note
dws
<blockquote>
<code>
BAD: if ($po->status->name eq 'Sent') ...
ALMOST AS BAD: if ($po->can_send) ...
GOOD: $po->send
</code>
You are breaking encapsulation in all but the last case.
</blockquote>
How, pray tell, does a predicate function "break encapsulation"? <code>can_send</code> is not a getter; it reveals nothing about how the purchase order answers the question. Encapsulation is quite safely preserved.
<p>
259306
259928