No such thing as a small change | |
PerlMonks |
Re: A question of style: Composite keys to multiple valuesby TGI (Parson) |
on Aug 07, 2012 at 17:27 UTC ( [id://986037]=note: print w/replies, xml ) | Need Help?? |
Hide the complexity behind an interface.
Use it like this:
Now, when you have to deal with millions of field/name pairs, and you move to Redis or memcached to store them, you just have to update the lookup function. A good interface with horrible code behind it is 10000% better than the most elegant snippets sprinkled everywhere.
In Section
Seekers of Perl Wisdom
|
|