Matt S Trout > DBIx-Class-0.03 > DBIx::Class::DB

Download:
DBIx-Class-0.03.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  12
Open  16
Stalled  12
View/Report Bugs
Source   Latest Release: DBIx-Class-0.082700_05

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.

syntax highlighting: