[Dbix-class] seeming error in Manual's CD db example

Darren Duncan darren at darrenduncan.net
Thu May 13 00:49:51 GMT 2010


Hello,

If you look at 
http://search.cpan.org/dist/DBIx-Class/lib/DBIx/Class/Manual/Example.pod , I am 
seeing what appears to be an error in the example, in this block

   package MyDatabase::Main::Result::Cd;
   use base qw/DBIx::Class::Core/;
   __PACKAGE__->load_components(qw/InflateColumn::DateTime/);
   __PACKAGE__->table('cd');
   __PACKAGE__->add_columns(qw/ cdid artist title/);
   __PACKAGE__->set_primary_key('cdid');
   __PACKAGE__->belongs_to('artist' => 'MyDatabase::Main::Result::Artist');
   __PACKAGE__->has_many('tracks' => 'MyDatabase::Main::Result::Track');

Maybe I'm misunderstanding something, but offhand it looks like 
"InflateColumn::DateTime" is being loaded gratuitously because the database 
doesn't have any temporal data columns, just plain text and/or plain integers, 
so that component would never be used.

So maybe that line can be removed?  And if not then why not?

-- Darren Duncan



More information about the DBIx-Class mailing list