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