[Catalyst] Basic Background Question, DBIx::Class

Rob Brown rob at intelcompute.com
Sun Feb 5 11:43:34 GMT 2012


I've recently jumped into Catalyst and DBIx::Class, and after following
some tutorials, I am left with some controllers and a view which I'm
completely happy with.

The lib/Schema and lib/Model directories have me a little confused

I have a single class in lib/Model, inheriting from
Catalyst::Model::DBIC::Schema with some db connection details.

Then the lib/Schema.pm class and dir, and Result classes for my db

I understand what they're all doing, but...

Shouldn't I have classes in lib/Model/ for each of my tables/models?  Is
this what the Schema/ classes should be doing?

I'm used to creating set classes for each model in my apps, so just
having the DBIx::Class ones is a little odd right now, with no REAL
logic in them to model my app logic.

I would have expected some basic wrapper model classes in lib/Model/ for
each Schema/Result.

Maybe a single class in lib/Model/ is correct, to model the entire DB,
it just threw me a little.

some feedback/direction would be great.


More information about the Catalyst mailing list