AK108 has asked for the wisdom of the Perl Monks concerning the following question:
I was wondering about the efficiency of requiring in a configuration file versus opening it, reading it, and closing it. To make things more interesting, the built-in open and close routines aren't used. It uses subroutines that provide file-locking and more instead. Using a database isn't an option, as the board uses flatfiles for everything and it makes no sense to require a database.
Also, if using Perl code as options is better, should I use Data::Dumper or a similar module instead of building up the options (which are just strings and mostly true or false) without it?
P.S. if you recommend a module, it needs to run on the old 5.004-ish versions, and with a pure-Perl implementation.
Edit1: Thought of more stuff to add.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Using Perl files for options versus flatfiles?
by davido (Cardinal) on Jan 30, 2006 at 06:24 UTC | |
|
Re: Using Perl files for options versus flatfiles?
by strat (Canon) on Jan 30, 2006 at 10:39 UTC | |
|
Re: Using Perl files for options versus flatfiles?
by ambrus (Abbot) on Jan 30, 2006 at 08:22 UTC | |
|
Re: Using Perl files for options versus flatfiles?
by glasswalk3r (Friar) on Jan 30, 2006 at 12:55 UTC | |
|
Re: Using Perl files for options versus flatfiles?
by idle (Friar) on Jan 30, 2006 at 08:30 UTC |