> From: angie ahl <[EMAIL PROTECTED]>
> Date: 2005/01/07 Fri PM 01:45:59 CST
> Is PerlSetVar the best way to pass values from httpd.conf to perl securely?
> Do I need to open/close the connection in each of the modules too or
> can I pass the $dbh object to each of my external subroutines, or is
> there an even better way.
I've recently been working on a small web-based interface for my database
schemas, so that the developers can update the models, and have found it very
useful to do:
require ("./dbconnect.pl"); # a shared connect script
our $dbh = dbconnect();
That let's me declare my db connection once, and have it available to all my
subroutines and to the other two scripts that I require() in...
Remember to make use of your 'our', 'my' and 'local' variable declarations...
> Thanks
> Angie
HTH,
amonotod
--
`\|||/ amonotod@ | sun|perl|windows
(@@) charter.net | sysadmin|dba
ooO_(_)_Ooo____________________________________
_____|_____|_____|_____|_____|_____|_____|_____|