13 my @comp = map { "DBIx::Class::$_" } @_;
14 foreach my $comp (@comp) {
19 unshift(@{"${class}::ISA"}, @comp);
26 DBIx::Class - Because the brain is a terrible thing to waste.
32 This is a sql to oop mapper, inspired by the L<Class::DBI> framework,
33 and meant to support compability with it, while restructuring the
34 insides, and making it possible to support some new features like
35 self-joins, distinct, group bys and more.
39 If you're using Class::DBI, replacing
41 use base qw/Class::DBI/;
45 use base qw/DBIx::Class/;
46 __PACKAGE__->load_components(qw/CDBICompat Core/);
48 will probably get you started.
50 If you're using AUTO_INCREMENT for your primary columns, you'll also want
51 yo load the approriate PK::Auto subclass - e.g.
53 __PACKAGE__->load_components(qw/CDBICompat PK::Auto::SQLite Core/);
55 (with is what ::Test::SQLite does to present the Class::DBI::Test::SQLite
58 If you fancy playing around with DBIx::Class from scratch, then read the docs
59 for ::Table and ::Relationship,
61 use base qw/DBIx::Class/;
62 __PACKAGE__->load_components(qw/Core/);
64 and have a look at t/lib/DBICTest.pm for a brief example.
68 Matt S. Trout <perl-stuff@trout.me.uk>
72 You may distribute this code under the same terms as Perl itself.