Fix up delete code after previous commit
[dbsrgits/DBIx-Class-Historic.git] / lib / DBIx / Class.pm
CommitLineData
ea2e61bf 1package DBIx::Class;
2
5d283305 3use strict;
4use warnings;
5
5d283305 6use vars qw($VERSION);
3c0068c1 7use base qw/DBIx::Class::Componentised Class::Data::Accessor/;
8
9sub mk_classdata { shift->mk_classaccessor(@_); }
7411204b 10sub component_base_class { 'DBIx::Class' }
227d4dee 11
95da6f35 12# Always remember to do all digits for the version even if they're 0
13# i.e. first release of 0.XX *must* be 0.XX000. This avoids fBSD ports
14# brain damage and presumably various other packaging systems too
15
ef940582 16$VERSION = '0.05002';
b8777a0d 17
f0750722 18sub MODIFY_CODE_ATTRIBUTES {
19 my ($class,$code,@attrs) = @_;
20 unless ($class->can('_attr_cache')) {
21 $class->mk_classdata('_attr_cache');
22 $class->_attr_cache({});
23 }
24 my $cache = $class->_attr_cache;
25 $class->_attr_cache->{$code} = [@attrs];
26 return ();
27}
28
ea2e61bf 291;
34d52be2 30
31=head1 NAME
32
7e4b2f59 33DBIx::Class - Extensible and flexible object <-> relational mapper.
34d52be2 34
35=head1 SYNOPSIS
36
37=head1 DESCRIPTION
38
8091aa91 39This is an SQL to OO mapper, inspired by the L<Class::DBI> framework,
34d52be2 40and meant to support compability with it, while restructuring the
8091aa91 41internals and making it possible to support some new features like
34d52be2 42self-joins, distinct, group bys and more.
43
8091aa91 44This project is still at an early stage, so the maintainers don't make
96ce20f5 45any absolute promise that full backwards-compatibility will be supported;
8091aa91 46however, if we can without compromising the improvements we're trying to
96ce20f5 47make, we will, and any non-compatible changes will merit a full justification
48on the mailing list and a CPAN developer release for people to test against.
daec44b8 49
50The community can be found via -
51
52 Mailing list: http://lists.rawmode.org/mailman/listinfo/dbix-class/
53
54 SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/
55
56 Wiki: http://dbix-class.shadowcatsystems.co.uk/
57
58 IRC: irc.perl.org#dbix-class
59
39fe0e65 60=head1 QUICKSTART
61
8091aa91 62If you're using L<Class::DBI>, and want an easy and fast way of migrating to
63DBIx::Class, take a look at L<DBIx::Class::CDBICompat>.
39fe0e65 64
8091aa91 65There are two ways of using DBIx::Class, the "simple" way and the "schema" way.
66The "simple" way of using DBIx::Class needs less classes than the "schema"
67way but doesn't give you the ability to easily use different database connections.
39fe0e65 68
448c8424 69Some examples where different database connections are useful are:
39fe0e65 70
448c8424 71different users with different rights
72different databases with the same schema.
39fe0e65 73
00787068 74=head2 Simple
126042ee 75
8091aa91 76First you need to create a base class which all other classes will inherit from.
77See L<DBIx::Class::DB> for information on how to do this.
39fe0e65 78
8091aa91 79Then you need to create a class for every table you want to use with DBIx::Class.
80See L<DBIx::Class::Table> for information on how to do this.
448c8424 81
82=head2 Schema
83
8091aa91 84With this approach, the table classes inherit directly from DBIx::Class::Core,
85although it might be a good idea to create a "parent" class for all table
86classes that inherits from DBIx::Class::Core and adds additional methods
87needed by all table classes, e.g. reading a config file or loading auto primary
448c8424 88key support.
89
8091aa91 90Look at L<DBIx::Class::Schema> for information on how to do this.
448c8424 91
8091aa91 92If you need more help, check out the introduction in the
448c8424 93manual below.
39fe0e65 94
076652e8 95=head1 SEE ALSO
96
a39e84a3 97=over 4
8091aa91 98
a39e84a3 99=item L<DBIx::Class::Core> - DBIC Core Classes
8091aa91 100
a39e84a3 101=item L<DBIx::Class::Manual> - User's manual
8091aa91 102
a39e84a3 103=item L<DBIx::Class::CDBICompat> - L<Class::DBI> Compat layer
076652e8 104
a39e84a3 105=item L<DBIx::Class::Schema>
076652e8 106
a39e84a3 107=item L<DBIx::Class::ResultSet>
076652e8 108
a39e84a3 109=item L<DBIx::Class::ResultSource>
076652e8 110
a39e84a3 111=item L<DBIx::Class::Row> - row-level methods
4db53147 112
a39e84a3 113=item L<DBIx::Class::PK> - primary key methods
114
115=item L<DBIx::Class::Relationship> - relationships between tables
116
117=back
076652e8 118
3942ab4d 119=head1 AUTHOR
34d52be2 120
daec44b8 121Matt S. Trout <mst@shadowcatsystems.co.uk>
34d52be2 122
3942ab4d 123=head1 CONTRIBUTORS
124
125Andy Grundman <andy@hybridized.org>
126
127Brian Cassidy <bricas@cpan.org>
128
129Dan Kubb <dan.kubb-cpan@onautopilot.com>
130
131Dan Sully <daniel@cpan.org>
132
ccb9c9b1 133David Kamholz <dkamholz@cpan.org>
134
135Jules Bean
3942ab4d 136
137Marcus Ramberg <mramberg@cpan.org>
138
ccb9c9b1 139Paul Makepeace
140
4685e006 141CL Kao
142
143Jess Robinson
144
145Marcus Ramberg
146
8fe164b9 147Will Hawes
148
ad3d2d7c 149Todd Lipcon
150
5fb0c64c 151Daniel Westermann-Clark <danieltwc@cpan.org>
152
d7c4c15c 153Alexander Hartmaier <alex_hartmaier@hotmail.com>
154
103e3e03 155Zbigniew Lukasiak
156
6565b410 157Nigel Metheringham <nigelm@cpan.org>
158
7be93b07 159Jesper Krogh
160
412db1f4 161Brandon Black
162
34d52be2 163=head1 LICENSE
164
165You may distribute this code under the same terms as Perl itself.
166
167=cut
168