Typo in scalar ref example
[dbsrgits/DBIx-Class-Historic.git] / lib / DBIx / Class / CDBICompat.pm
1 package DBIx::Class::CDBICompat;
2
3 use strict;
4 use warnings;
5 use base qw/DBIx::Class::Core DBIx::Class::DB/;
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 $@;
13
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
26   HasA
27   HasMany
28   MightHave
29   LazyLoading
30   AutoUpdate
31   TempColumns
32   Retrieve
33   Pager
34   ColumnGroups
35   ImaDBI/);
36
37             #DBIx::Class::ObjIndexStubs
38 1;
39
40 =head1 NAME
41
42 DBIx::Class::CDBICompat - Class::DBI Compatibility layer.
43
44 =head1 SYNOPSIS
45
46   use base qw/DBIx::Class/;
47   __PACKAGE__->load_components(qw/CDBICompat Core DB/);
48
49 =head1 DESCRIPTION
50
51 DBIx::Class features a fully featured compatibility 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 =item HasMany
98
99 =item ImaDBI
100
101 =item LazyLoading
102
103 =item LiveObjectIndex
104
105 The live object index tries to ensure there is only one version of a object
106 in the perl interpreter.
107
108 =item MightHave
109
110 =item ObjIndexStubs
111
112 =item ReadOnly
113
114 =item Retrieve
115
116 =item Stringify
117
118 =item TempColumns
119
120 =item Triggers
121
122 =item PassThrough
123
124 =back
125
126 =head1 AUTHORS
127
128 Matt S. Trout <mst@shadowcatsystems.co.uk>
129
130 =head1 LICENSE
131
132 You may distribute this code under the same terms as Perl itself.
133
134 =cut
135