in reply to Re: Experimenting with Lvalue Subs
in thread Experimenting with Lvalue Subs
What you're saying is that providing the rvalue to the sub for validation would require the sub to be called twice. Once to obtain (a reference to) the lvalue, and the second time to allow the verification.
But if the mechanism to validate is to tie the lvalue, then a second call is going to be made anyway--to the STORE method of the tie. No different!
Except that you now have a piece of out-of-band code performing the validation, and second level of lookup to locate the appropriate tie class and a third level of lookup locate the STORE method within that.
And all this to avoid a second call in the rare case when the assignment will be undone at the end of scope?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Experimenting with Lvalue Subs
by ysth (Canon) on Jan 25, 2005 at 17:31 UTC | |
by demerphq (Chancellor) on Jan 25, 2005 at 19:33 UTC | |
by Aristotle (Chancellor) on Jan 25, 2005 at 21:43 UTC |