X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass.pm;h=9f05f06f078a7ee2f79d93949ccc800c6c0329b1;hb=227d4dee52a91339e04dd509712ac062450bbb82;hp=bcba15f182dc59195acf97750cf486b76affeaff;hpb=a02675cd9a11e1f354220319da9f5d573a2e484a;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/DBIx/Class.pm b/lib/DBIx/Class.pm index bcba15f..9f05f06 100644 --- a/lib/DBIx/Class.pm +++ b/lib/DBIx/Class.pm @@ -4,20 +4,10 @@ use strict; use warnings; use vars qw($VERSION); -use base; +use base qw/DBIx::Class::Componentised/; -$VERSION = '0.01'; +$VERSION = '0.02'; -sub load_components { - my $class = shift; - my @comp = map { "DBIx::Class::$_" } grep { $_ !~ /^#/ } @_; - foreach my $comp (@comp) { - eval "use $comp"; - die $@ if $@; - } - no strict 'refs'; - unshift(@{"${class}::ISA"}, @comp); -} 1; @@ -34,23 +24,38 @@ and meant to support compability with it, while restructuring the insides, and making it possible to support some new features like self-joins, distinct, group bys and more. +It's currently considered EXPERIMENTAL - bring this near a production +database at your own risk! The API is *not* fixed yet, although most of +the primitives should be good for the future and any API changes will be +posted to the mailing list before they're committed. + +The community can be found via - + + Mailing list: http://lists.rawmode.org/mailman/listinfo/dbix-class/ + + SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/ + + Wiki: http://dbix-class.shadowcatsystems.co.uk/ + + IRC: irc.perl.org#dbix-class + =head1 QUICKSTART If you're using Class::DBI, replacing -use base qw/Class::DBI/; + use base qw/Class::DBI/; with -use base qw/DBIx::Class/; -__PACKAGE__->load_components(qw/CDBICompat Core DB/); + use base qw/DBIx::Class/; + __PACKAGE__->load_components(qw/CDBICompat Core DB/); will probably get you started. If you're using AUTO_INCREMENT for your primary columns, you'll also want yo load the approriate PK::Auto subclass - e.g. -__PACKAGE__->load_components(qw/CDBICompat PK::Auto::SQLite Core DB/); + __PACKAGE__->load_components(qw/CDBICompat PK::Auto::SQLite Core DB/); (with is what ::Test::SQLite does to present the Class::DBI::Test::SQLite interface) @@ -58,14 +63,14 @@ interface) If you fancy playing around with DBIx::Class from scratch, then read the docs for ::Table and ::Relationship, -use base qw/DBIx::Class/; -__PACKAGE__->load_components(qw/Core DB/); + use base qw/DBIx::Class/; + __PACKAGE__->load_components(qw/Core DB/); and have a look at t/lib/DBICTest.pm for a brief example. =head1 AUTHORS -Matt S. Trout +Matt S. Trout =head1 LICENSE