
DBIx::Class::DB - Simple DBIx::Class Database connection by class inheritance

package MyDB;
use base qw/DBIx::Class/;
__PACKAGE__->load_components('DB');
__PACKAGE__->connection('dbi:...', 'user', 'pass', \%attrs);
package MyDB::MyTable;
use base qw/MyDB/;
__PACKAGE__->load_components('Core');
...

This class provides a simple way of specifying a database connection.

Which storage backend to be used. Defaults to DBIx::Class::Storage::DBI
Which class to use for resolving a class. Defaults to DBIx::Class::ClassResolver::Passthrough, which returns whatever you throw at it. See resolve_class below.
__PACKAGE__->connection($dsn, $user, $pass, $attrs);
Specifies the arguments that will be passed to DBI->connect(...) to instantiate the class dbh when required.
$class->dbi_commit;
Issues a commit again the current dbh
$class->dbi_rollback;
Issues a rollback again the current dbh

Matt S. Trout <mst@shadowcatsystems.co.uk>

You may distribute this code under the same terms as Perl itself.