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 |
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 |
38 | 1; |
34d52be2 |
39 | |
40 | =head1 NAME |
41 | |
42 | DBIx::Class::CDBICompat - Class::DBI Compatability layer. |
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 | |
15fe6346 |
51 | DBIx::Class features a fully featured compability layer with L<Class::DBI> |
52 | to ease transition for existing CDBI users. In fact, this class is just a |
53 | receipe containing all the features emulated. If you like, you can choose |
54 | which features to emulate by building your own class and loading it like |
55 | this: |
56 | |
57 | __PACKAGE__->load_own_components(qw/CDBICompat/); |
58 | |
59 | this will automatically load the features included in My::DB::CDBICompat, |
60 | provided 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 | |
71 | =head1 Components |
72 | |
73 | =over 4 |
74 | |
75 | =item AccessorMapping |
76 | |
77 | =item AttributeAPI |
78 | |
79 | =item AutoUpdate |
80 | |
81 | Allows 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 | |
97 | Responsible for HasA relationships. |
98 | |
99 | =item HasMany |
100 | |
101 | Responsible for HasMany relationships. |
102 | |
103 | =item ImaDBI |
104 | |
105 | =item LazyLoading |
106 | |
107 | =item LiveObjectIndex |
108 | |
109 | The live object index tries to ensure there is only one version of a object |
110 | in the perl interprenter. |
111 | |
112 | =item MightHave |
113 | |
114 | Responsible for MightHave relationships. |
115 | |
116 | =item ObjIndexStubs |
117 | |
118 | =item ReadOnly |
119 | |
120 | =item Retrieve |
121 | |
122 | =item Stringify |
123 | |
124 | =item TempColumns |
125 | |
126 | =item Triggers |
127 | |
128 | This class implements the trigger functionality. |
129 | |
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 | |