Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

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?

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (2)
As of 2015-11-28 06:56 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (739 votes), past polls