From: Michael G Schwern Date: Wed, 13 Feb 2008 22:10:33 +0000 (-0800) Subject: Expand the CDBICompat docs to show of it's features, the fact that you're X-Git-Tag: v0.08240~541^2~20 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=4965b78dd4e52d7058d27ebc79e5138d3f565738;p=dbsrgits%2FDBIx-Class.git Expand the CDBICompat docs to show of it's features, the fact that you're getting DBIC objects and to be more oriented towards CDBI users. --- diff --git a/lib/DBIx/Class/CDBICompat.pm b/lib/DBIx/Class/CDBICompat.pm index 49988c9..ee797a2 100644 --- a/lib/DBIx/Class/CDBICompat.pm +++ b/lib/DBIx/Class/CDBICompat.pm @@ -46,18 +46,47 @@ DBIx::Class::CDBICompat - Class::DBI Compatibility layer. =head1 SYNOPSIS - use base qw/DBIx::Class/; - __PACKAGE__->load_components(qw/CDBICompat Core DB/); + package My::CDBI; + use base qw/DBIx::Class::CDBICompat/; + + ...continue as Class::DBI... =head1 DESCRIPTION DBIx::Class features a fully featured compatibility layer with L -and L to ease transition for existing CDBI users. +and some common plugins to ease transition for existing CDBI users. + +This is not a wrapper or subclass of DBIx::Class but rather a series of plugins. The result being that even though you're using the Class::DBI emulation layer you are still getting DBIx::Class objects. You can use all DBIx::Class features and methods via CDBICompat. This allows you to take advantage of DBIx::Class features without having to rewrite your CDBI code. + + +=head2 Plugins + +CDBICompat is good enough that many CDBI plugins will work with CDBICompat, but many of the plugin features are better done with DBIx::Class methods. + +=head3 Class::DBI::AbstractSearch + +C is fully emulated using DBIC's search. Aside from emulation there's no reason to use C. + +=head3 Class::DBI::Plugin::NoCache + +C is fully emulated. + +=head3 Class::DBI::Sweet + +The features of CDBI::Sweet are better done using DBIC methods which are almost exactly the same. It even uses L. + +=head3 Class::DBI::Plugin::DeepAbstractSearch + +This is better done using DBIC's native search facilities. The major difference is that DBIC will not infer the join for you, you have to tell it the join tables. + + +=head2 Choosing Features In fact, this class is just a receipe containing all the features emulated. If you like, you can choose which features to emulate by building your own class and loading it like this: + package My::DB; __PACKAGE__->load_own_components(qw/CDBICompat/); this will automatically load the features included in My::DB::CDBICompat,