in reply to Variable Declaration
Either way (pakage or function file) sounds good, but I would make a configuration file. There are several modules to help ou with that on CPAN.
In addition to database information, I place paths, filenames, debug levels and anything else that is static in there.
You could also declare a bunch of constants in a file to be required.
Tiago
Re: Re: Variable Declaration
by Voronich (Hermit) on Oct 19, 2001 at 17:50 UTC
|
My god. NO!!! It's the dreaded "me too" post!
I like a combination of these ideas.
Maintain a module that will give you the open handle, that uses a config file to grab it. That way you can play all the games you want with specifying config files and datasources hot.
We have a bunch of code that we all of a sudden needed to link to multiple databases (*sniff* *sniff* legacy system? Yep, the tracks are still warm.) And that approach saved our collective posteriors.
$.02
- V
| [reply] |
|