[Templates] Template::Plugin::DBI - Using an existing db handle

Dave Cross dave@dave.org.uk
Tue, 27 Jun 2006 23:50:38 +0100


Evan Kaufman wrote:

> And then, on the perl side, I specify the dbh, and the query:
> 
> my $dbh = DBI->connect("dsn-stuff");
> $tt->process("page.html",
>  {
>    global_dbh => \$dbh,
>    genre_query => "SELECT ID, Desc FROM Table;"
>  }
> );

There's no need to take a reference to your database handle. Try just 
global_dbh => $dbh.

Dave...