good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re^4: Writing general code: real world example - and doubts!by Zaxo (Archbishop) |
on Apr 05, 2005 at 09:09 UTC ( [id://444904]=note: print w/replies, xml ) | Need Help?? |
You're right, readability suffers with that approach. Because code is invoked at a distance, and there is no local indication of which variables are covered by the validation mechanism, the reader needs to absorb the ties before getting to the real code. That's likely to be missed by a maintainer. Documentation helps, comments help, but those may not be enough. You spotted the principal weakness. I'm not yet encouraging anyone to use Tie::Constrained in production. The API is not yet stable, simple as it is. I'll make a version 1.00 release when I think it's ready. If you have suggestions, I'd welcome them. After Compline,
In Section
Meditations
|
|