On Saturday, May 31, 2003, at 12:48 US/Pacific, Scot Robnett wrote:


##### config.txt #####
$firstname = qq(Sara);
$lastname  = qq(Perlfreak);
$email     = q([EMAIL PROTECTED]);
### end config.txt ###

-----------------------------------------------------------------
[..]

A reasonable enough approach! But I think folks MAY
want to look at not abusing

require("/some/path/here");

and look at the approach of building out a Perl Module
that they can

use My::Foo:Config;

Since whil the simpler 'require' is a way to quickly
and cheaply avoid having to have

        a. a real config file format
        b. a config file parser


There are ugly bits about name_space that can bite one's code in the long run...

Do you really want $firstname, $lastname, $email
to all be in the main:: name space????

One trick I used was

http://www.wetware.com/drieux/pbl/Sys/ParseConfigFile.txt

for playing around with the basic 'config file parsing'.

Going with the more traditional perl module approach
would allow one to have more effective control over
how the "variables" are found, and used, and which
name space they are in....



ciao
drieux

---


-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to