Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^3: Mysql and Perl Module

by tospo (Hermit)
on Jun 14, 2012 at 09:29 UTC ( #976161=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Mysql and Perl Module
in thread Mysql and Perl Module

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.


Comment on Re^3: Mysql and Perl Module

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://976161]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (6)
As of 2014-09-15 02:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (145 votes), past polls