On Oct 2, 2006, at 1:57 PM, Vladimir S. Tikhonjuk wrote:
my $database_connect = DBI->connect( 'dbi:Pg:dbname=$database;host=$host, $user, $password ) || die "Can't connect to database: ".$DBI::errstr;As I understand, I may write a handler, which would have such code, and then use pnotes to export $database_connect variable to other handlers.Could anyone give me any example of such tasks ?
if you are using apache::dbi, you can just repeatedly call connect-- apache::dbi will catch the connect and just toss you back the existing connection
===
but storing pnotes is just
handler 1
$r->pnotes( 'database_connect'=> $database_connect );
handler 2
my $database_connect = $r->pnotes('database_connect');
Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.