Fixes, refactoring, test additions
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class.pm
1 package DBIx::Class;
2
3 use strict;
4 use warnings;
5
6 use vars qw($VERSION);
7 use base qw/DBIx::Class::Componentised/;
8
9 $VERSION = '0.02';
10
11
12 1;
13
14 =head1 NAME 
15
16 DBIx::Class - Because the brain is a terrible thing to waste.
17
18 =head1 SYNOPSIS
19
20 =head1 DESCRIPTION
21
22 This is a sql to oop mapper, inspired by the L<Class::DBI> framework, 
23 and meant to support compability with it, while restructuring the 
24 insides, and making it possible to support some new features like 
25 self-joins, distinct, group bys and more.
26
27 It's currently considered EXPERIMENTAL - bring this near a production
28 database at your own risk! The API is *not* fixed yet, although most of
29 the primitives should be good for the future and any API changes will be
30 posted to the mailing list before they're committed.
31
32 The community can be found via -
33
34   Mailing list: http://lists.rawmode.org/mailman/listinfo/dbix-class/
35
36   SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/
37
38   Wiki: http://dbix-class.shadowcatsystems.co.uk/
39
40   IRC: irc.perl.org#dbix-class
41
42 =head1 QUICKSTART
43
44 If you're using Class::DBI, replacing
45
46   use base qw/Class::DBI/;
47
48 with
49
50   use base qw/DBIx::Class/;
51   __PACKAGE__->load_components(qw/CDBICompat Core DB/);
52
53 will probably get you started.
54
55 If you're using AUTO_INCREMENT for your primary columns, you'll also want
56 yo load the approriate PK::Auto subclass - e.g.
57
58   __PACKAGE__->load_components(qw/CDBICompat PK::Auto::SQLite Core DB/);
59
60 (with is what ::Test::SQLite does to present the Class::DBI::Test::SQLite
61 interface)
62
63 If you fancy playing around with DBIx::Class from scratch, then read the docs
64 for ::Table and ::Relationship,
65
66   use base qw/DBIx::Class/;
67   __PACKAGE__->load_components(qw/Core DB/);
68
69 and have a look at t/lib/DBICTest.pm for a brief example.
70
71 =head1 AUTHORS
72
73 Matt S. Trout <mst@shadowcatsystems.co.uk>
74
75 =head1 LICENSE
76
77 You may distribute this code under the same terms as Perl itself.
78
79 =cut
80