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

Download:
DBIx-Class-0.03.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  12
Open  18
Stalled  11
View/Report Bugs
Source   Latest Release: DBIx-Class-0.082810

NAME ^

DBIx::Class::Schema - composable schemas

SYNOPSIS ^

  in My/Schema.pm

  package My::Schema;

  use base qw/DBIx::Class::Schema/;

  __PACKAGE__->load_classes(qw/Foo Bar Baz/);

  in My/Schema/Foo.pm

  package My::Schema::Foo;

  use base qw/DBIx::Class::Core/;

  __PACKAGE__->table('foo');
  ...

  in My/DB.pm

  use My::Schema;

  My::Schema->compose_connection('My::DB', $dsn, $user, $pass, $attrs);

  then in app code

  my @obj = My::DB::Foo->search({}); # My::DB::Foo isa My::Schema::Foo My::DB

DESCRIPTION ^

METHODS ^

AUTHORS ^

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

LICENSE ^

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

syntax highlighting: