in reply to Re^6: Experimenting with Lvalue Subs
in thread Experimenting with Lvalue Subs
What prevents you from writing, say, a Tie::IntRange class that constrains the values assigned to the scalar it ties, and reusing that code 1,500× for all your 1,500 attributes (with a different range declared in each instantiation of the tied class)? Or Tie::EnsureMatch which constrains the values assigned to the scalar it ties to those matching a particular regex supplied at instantiation time?
This kind of reuse is really no different from what we already use Params::Validate for in another context.
Makeshifts last the longest.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^8: Experimenting with Lvalue Subs
by TimToady (Parson) on Jan 25, 2005 at 19:30 UTC | |
|
Re^8: Experimenting with Lvalue Subs
by BrowserUk (Patriarch) on Jan 25, 2005 at 10:56 UTC |