in reply to Re: Re: How do you load configuration variables
in thread How do you load configuration variables
I always create a module to handle program configuration, and I always call it Program::RC
Why not just write that module once, name it once, and then reuse it in each application? Better yet, why not just use a module that already exists for just such a purpose; something like AppConfig, for instance?
No matter how you access your config file — AppConfig, a home-brewed module, do $config or die $!, whatever — it's still best to hardcode the path in your program and allow it to be overridden with command-line args or envariables as necessary.
-sauoq "My two cents aren't worth a dime.";
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Re: Re: How do you load configuration variables
by Excalibor (Pilgrim) on Jul 14, 2003 at 10:11 UTC |