in reply to Class::DBI, how to pass dynamic connection string to set_db

You might be using the wrong tool. Or you might ask on the Class DBI Mailing list at here

Class::DBI is a tool for crafting applications, not for on-the-fly type stuff. You might look at DBIx::Recordset::Playground and DBIx::Connect for dynamic database usage.

Carter's compass: I know I'm on the right track when by deleting something, I'm adding functionality.

  • Comment on Re: Class::DBI, how to pass dynamic connection string to set_db

Replies are listed 'Best First'.
Re: Re: Class::DBI, how to pass dynamic connection string to set_db
by perrin (Chancellor) on Sep 23, 2003 at 19:08 UTC
    He's just asking about how to use his own method for creating database connections. Class::DBI supports that. You could easilly use DBIx::Connect with Class::DBI.
      Could you provide a high level example?
        To use DBIx::Connect in your Class::DBI class:

        sub db_Main { my $dbh = DBIx::Connect->to('dev_db'); return $dbh; }