And where do you store the information about connecting to the database?
@_=qw; ask f00li5h to appear and remain for a moment of pretend better than a lifetime;;s;;@_[map hex,split'',B204316D8C2A4516DE];;y/05/os/&print;
| [reply] [d/l] |
++ just for your .sig.
Jack
| [reply] |
In same place you store the information that says how to read from the environment / the command line / a config file / etc. ?
At some point, you have to tell the program where to look, and what to look for, no matter what it is you're looking at...
| [reply] |
True, but something like a database connection string does need to be different for each build-environment you run in, ie you will surely not want the development code connecting to your production database, for example. So I would say that a DSN is a farily important thing to be able to configure,
.. unless you are going to have a configuration database, to which all code connects, and gets the dsn for it's database from there ...
</sarcasm>
but really, they do something close to this $client, there are constants that come from the database, and a constant to determine the database to go to *shudder*
@_=qw; ask f00li5h to appear and remain for a moment of pretend better than a lifetime;;s;;@_[map hex,split'',B204316D8C2A4516DE];;y/05/os/&print;
| [reply] [d/l] |