Class::DBI::BaseDSN acts as a placeholder for a base class which will
be switched for a specific Class::DBI extension when you specify the
dsn of the database to connect to.
For example in this case, the Class::DBI::BaseDSN will replace itself
with Class::DBI::mysql when the set_db call is executed.
use base Class::DBI::BaseDSN;
__PACKAGE__->set_db( Main => dbi:mysql:example, user, pass );
Since this happens at runtime you could pass the dsn as a variable and
so have it use a completely different extension automatically. This
is especially useful for testing, or for applications where dsn may be
a configuration option.
If there is no matching extension found, Class::DBI::BaseDSN replaces
itself with Class::DBI.