[Catalyst] Catalyst::Model::CDBI

Michele Beltrame mb at italpro.net
Thu Oct 6 18:51:05 CEST 2005


Hi!

> Yes.. but doesn't that solutoin assumes that I have a "model" class?
> I dont, since it uses Class::DBI::Loader to load the database model.

A model class is just a couple of rows of code, you put it where your DB 
modules "stay" (i.e. lib/MyApp/M/DB/):

-----
package MyApp::M::DB::MyTable;

use strict;

__PACKAGE__->columns(Essential => qw/id nick name cdate/);

1;
-----

That's all, no need to code further. However, you need to code this bit 
if you want to customize the lazy population. ;-)

	Hope this helps, Michele.

-- 
Michele Beltrame
http://www.massainforme.it/mb/
ICQ# 76660101
Informativa privacy: http://www.italpro.net/em.html



More information about the Catalyst mailing list