package My::DBI::Config; use base qw/Class::DBI/; My::DBI::Config->set_db { ... #### package My::DBI; use base qw(My::DBI::Config); #### Give it a database connection Class::DBI needs to know how to access the database. It does this through a DBI connection which you set up by calling the set_db() method. Music::DBI->set_db('Main', 'dbi:mysql:dbname', 'user', 'password'); By setting the connection up in your application base class all the table classes that inherit from it will share the same connection.