On Wed, 9 Aug 2006, Tim Keefer wrote:

> unfortunately I didn't make note of the versions before I upgraded.
>
> We're trying to accomplish two things,
> 1) pull database connection info out of our conf so the models can be shared
> between the web apps, scripts, etc.
> 2) avoid extraneous connects to the database.
>
> Here's the exact code reference:
>
> sub db_Main {
>    my $invocant = shift;
>    my $class    = ( ref $invocant ) ? ref $invocant : $invocant;
>
>   my $dbh;
>
>   my $helper = Gantry::Utils::DBConnHelper->get_subclass();
>
>   $dbh       = $helper->get_dbh();
>
>    if ( not $dbh ) {
>        my $conn_info  = $helper->get_conn_info();
>
>       my $db_options = $class->get_db_options();
>
>        $db_options->{AutoCommit} = 0
>             unless defined $db_options->{AutoCommit};
>
>        $dbh = DBI->connect_cached(
>                $conn_info->{ 'dbconn' },
>                $conn_info->{ 'dbuser' },
>                $conn_info->{ 'dbpass' },
>                $db_options
>       ) ;
>        $helper->set_dbh( $dbh );
>    }
>
>   return $dbh;
>
> } # end db_Main
>

I don't see where DBIx::Class is involved there at all?

Jess


_______________________________________________
List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
Wiki: http://dbix-class.shadowcatsystems.co.uk/
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/
Searchable Archive: http://www.mail-archive.com/[email protected]/

Reply via email to