|
|
| Pathologically Eclectic Rubbish Lister | |
| PerlMonks |
Re^2: Access Hashes of Hashes etc.by TomDLux (Vicar) |
| on Sep 14, 2011 at 16:19 UTC ( #925944=note: print w/ replies, xml ) | Need Help?? |
|
I often find it convenient to have a routine which claims to process all the records, which actually goes through the top-level keys and invokes another routine to processing the corresponding sub-nodes. I prefer to have short subroutines in any case, under 20 lines if at all possible, so this makes it easier to understand what each routine does. It's not like the 80s, when invoking a subroutine was drastically slower than doing things inline. It does generate a problem of coming up with names for several levels of subroutine: process_all_names(), process_one_name(), process_first_name(), process_last_name(), ... As Occam said: Entia non sunt multiplicanda praeter necessitatem.
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||