|
|
| Pathologically Eclectic Rubbish Lister | |
| PerlMonks |
Re: Optimization Help on Perl Hash Traversal (eval use)by CountZero (Chancellor) |
| on Feb 06, 2013 at 22:48 UTC ( #1017523=note: print w/ replies, xml ) | Need Help?? |
|
Adding to BrowserUK's suggestion, you could store your snippets into a YAML file and have them automatically eval-ed upon loading the YAML-file as part of your initialization. Here is an example: Here is the YAML-file: As you see that is very well readable and easily editable. Probably easier than adding the code to your database. CountZero A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James My blog: Imperial Deltronics
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||