|
|
| Think about Loose Coupling | |
| PerlMonks |
Re: The Bad, the Ugly, and the Good of autovivificationby 5mi11er (Chaplain) |
| on Apr 08, 2005 at 15:43 UTC ( #446051=note: print w/ replies, xml ) | Need Help?? |
|
There is something, added to 5.8, that could help catch the "typo"s from happening. I've been a lurker on the perl5-porters mailing list, and one of the more fascinating discussions I read about, back when I was actually able to take time to read that list, was an idea about creating "clamped" hashes. The idea was to help eliminate accidentally creating hash keys, but it grew from there. The current implementation has been made a core module called Hash::Util, you can read about it here. In an attempt to quickly summarize what you'll find at the link above, the following methods are available:
-Scott
In Section
Meditations
|
|
||||||||||||||||||||||||||||||||||||||||||||