Updated version and Changes for 0.06999_02
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / CDBICompat.pm
CommitLineData
ea2e61bf 1package DBIx::Class::CDBICompat;
2
3use strict;
4use warnings;
75a23b3e 5use base qw/DBIx::Class::Core DBIx::Class::DB/;
289ba852 6use Carp::Clan qw/^DBIx::Class/;
7
8eval {
9 require Class::Trigger;
10 require DBIx::ContextualFetch;
11};
12croak "Class::Trigger and DBIx::ContextualFetch is required for CDBICompat" if $@;
126042ee 13
55e2d745 14__PACKAGE__->load_own_components(qw/
15 Constraints
16 Triggers
17 ReadOnly
18 GetSet
19 LiveObjectIndex
20 AttributeAPI
21 Stringify
22 DestroyWarning
23 Constructor
24 AccessorMapping
25 ColumnCase
55e2d745 26 HasA
75a23b3e 27 HasMany
503536d5 28 MightHave
55e2d745 29 LazyLoading
30 AutoUpdate
31 TempColumns
32 Retrieve
2a21de92 33 Pager
55e2d745 34 ColumnGroups
35 ImaDBI/);
36
37 #DBIx::Class::ObjIndexStubs
ea2e61bf 381;
34d52be2 39
75d07914 40=head1 NAME
34d52be2 41
880a1a0c 42DBIx::Class::CDBICompat - Class::DBI Compatibility layer.
34d52be2 43
15fe6346 44=head1 SYNOPSIS
45
46 use base qw/DBIx::Class/;
47 __PACKAGE__->load_components(qw/CDBICompat Core DB/);
48
34d52be2 49=head1 DESCRIPTION
50
880a1a0c 51DBIx::Class features a fully featured compatibility layer with L<Class::DBI>
15fe6346 52to ease transition for existing CDBI users. In fact, this class is just a
53receipe containing all the features emulated. If you like, you can choose
75d07914 54which features to emulate by building your own class and loading it like
15fe6346 55this:
56
57 __PACKAGE__->load_own_components(qw/CDBICompat/);
58
75d07914 59this will automatically load the features included in My::DB::CDBICompat,
15fe6346 60provided it looks something like this:
61
62 package My::DB::CDBICompat;
63 __PACKAGE__->load_components(qw/
64 CDBICompat::ColumnGroups
65 CDBICompat::Retrieve
66 CDBICompat::HasA
67 CDBICompat::HasMany
68 CDBICompat::MightHave
69 /);
70
2053ab2a 71=head1 COMPONENTS
15fe6346 72
73=over 4
74
75=item AccessorMapping
76
77=item AttributeAPI
78
79=item AutoUpdate
80
81Allows you to turn on automatic updates for column values.
82
83=item ColumnCase
84
85=item ColumnGroups
86
87=item Constraints
88
89=item Constructor
90
91=item DestroyWarning
92
93=item GetSet
94
95=item HasA
96
15fe6346 97=item HasMany
98
15fe6346 99=item ImaDBI
100
101=item LazyLoading
102
103=item LiveObjectIndex
104
105The live object index tries to ensure there is only one version of a object
880a1a0c 106in the perl interpreter.
15fe6346 107
108=item MightHave
109
15fe6346 110=item ObjIndexStubs
111
112=item ReadOnly
113
114=item Retrieve
115
116=item Stringify
117
118=item TempColumns
119
120=item Triggers
121
15fe6346 122=item PassThrough
123
124=back
34d52be2 125
34d52be2 126=head1 AUTHORS
127
daec44b8 128Matt S. Trout <mst@shadowcatsystems.co.uk>
34d52be2 129
130=head1 LICENSE
131
132You may distribute this code under the same terms as Perl itself.
133
134=cut
135