How do you do the same with an lvalue sub?
You return a tied value. Ugly, slow, and doable. fergal did say <q>Neither of these expose an attribute, despite how it looks.</q>
You don’t. But, that’s okay because you never have a need to.
Why then would I ever have a need to go back and avoid lvalue subs?
Makeshifts last the longest.
In reply to Re^5: Perl OO and accessors
by Aristotle
in thread Perl OO and accessors
by dragonchild
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |