NAME

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

SYNOPSIS

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');

...

DESCRIPTION

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

METHODS

connection
__PACKAGE__->connection($dsn, $user, $pass, $attrs);

Specifies the arguments that will be passed to DBI->connect(...) to instantiate the class dbh when required.

dbi_commit
$class->dbi_commit;

Issues a commit again the current dbh

dbi_rollback
$class->dbi_rollback;

Issues a rollback again the current dbh

AUTHORS

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

LICENSE

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