1 package DBIx::Class::CDBICompat;
5 use base qw/DBIx::Class::Core DBIx::Class::DB/;
6 use Carp::Clan qw/^DBIx::Class/;
9 require Class::Trigger;
10 require DBIx::ContextualFetch;
12 croak "Class::Trigger and DBIx::ContextualFetch is required for CDBICompat" if $@;
14 __PACKAGE__->load_own_components(qw/
42 #DBIx::Class::ObjIndexStubs
47 DBIx::Class::CDBICompat - Class::DBI Compatibility layer.
51 use base qw/DBIx::Class/;
52 __PACKAGE__->load_components(qw/CDBICompat Core DB/);
56 DBIx::Class features a fully featured compatibility layer with L<Class::DBI>
57 and L<Class::DBI::AbstractSearch> to ease transition for existing CDBI users.
59 In fact, this class is just a receipe containing all the features emulated.
60 If you like, you can choose which features to emulate by building your
61 own class and loading it like this:
63 __PACKAGE__->load_own_components(qw/CDBICompat/);
65 this will automatically load the features included in My::DB::CDBICompat,
66 provided it looks something like this:
68 package My::DB::CDBICompat;
69 __PACKAGE__->load_components(qw/
70 CDBICompat::ColumnGroups
85 Compatibility with Class::DBI::AbstractSearch.
91 Allows you to turn on automatic updates for column values.
113 =item LiveObjectIndex
115 The live object index tries to ensure there is only one version of a object
116 in the perl interpreter.
138 The following methods and classes are not emulated, maybe in the future.
142 =item Class::DBI::Query
144 Deprecated in Class::DBI.
146 =item Class::DBI::Column
148 Not documented in Class::DBI. CDBICompat's columns() returns a plain string, not an object.
152 Undocumented CDBI method.
156 Undocumented CDBI method.
162 Matt S. Trout <mst@shadowcatsystems.co.uk>
166 You may distribute this code under the same terms as Perl itself.