Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^3: Mysql and Perl Module

by tospo (Hermit)
on Jun 14, 2012 at 09:29 UTC ( [id://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.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (6)
As of 2024-04-18 10:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found