in reply to Re: Encapsulation without methods
in thread Encapsulation without methods
A tied scalar can check before setting. Of course, in your example, if you had tied the foo element, then you'd have encapsulation.They violate encapsulation. A normal mutator can check the supplied ar +gument before setting the attribute it is protecting, an lvalue subro +utine never gets that chance.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Encapsulation without methods
by stvn (Monsignor) on Jun 22, 2004 at 04:33 UTC |