Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re^3: Mysql and Perl Moduleby tospo (Hermit) |
on Jun 14, 2012 at 09:29 UTC ( [id://976161]=note: print w/replies, xml ) | Need Help?? |
The ideal situation for that scenario is that your module takes some sort of config file with the DSN for the databse connection so that you can ship it with a tailor-made config file for each of your customers. Look at something like Config::General to handle such a config. Alternatively, you could make the DSN an argument that needs to be supplied by the user when running this script. If you have a lot of stuff to do with that database then it would also be worth exploring something like DBIx::Class to handle your database in a much more abstract way.
In Section
Seekers of Perl Wisdom
|
|