Hello all,

I am proud to announce the initial, development version of
DBIx::Class::Candy, which should be coming to a CPAN mirror near you very
soon.  If you just can't wait, use cpanf (
http://search.cpan.org/perldoc?App::CPAN::Fresh) to get it *right now*.  The
basic gist of it is that you can use:

 package MyApp::Schema::Result::Artist;

 use DBIx::Class::Candy;

 table 'artists';

 column id => {
   data_type => 'int',
   is_auto_increment => 1,
 };

 column name => {
   data_type => 'varchar',
   size => 25,
   is_nullable => 1,
 };

 primary_key 'id';

 has_many albums => 'A::Schema::Result::Album', 'artist_id';

 1;

instead of

 package MyApp::Schema::Result::Artist;

 use strict;
 use warnings;
 use base 'DBIx::Class::Core';

 __PACKAGE__->table('artists');

 __PACKAGE__->add_columns(
   id => {
     data_type => 'int',
     is_auto_increment => 1,
   },
   name => {
     data_type => 'varchar',
     size => 25,
     is_nullable => 1,
   }
 );

 __PACKAGE__->set_primary_key('id');

 __PACKAGE__->has_many( albums => 'A::Schema::Result::Album', 'artist_id' );

 1;

There are a few other features, like having it turn on 5.10 or 5.12
features, use a non standard base, and more.  Check it out now! (
http://search.cpan.org/perldoc?DBIx::Class::Candy)

-- 
fREW Schmidt
http://blog.afoolishmanifesto.com
_______________________________________________
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/[email protected]

Reply via email to