[Catalyst] Where to put FormValidator profiles?

Jesse Sheidlower jester at panix.com
Thu Aug 11 19:56:56 CEST 2005


On Thu, Aug 11, 2005 at 07:13:29AM -0700, Bill Moseley wrote:
> 
> Also, where's a good place to put profiles?  I suppose a file might be
> good, set in the application config.  But I'm curious how others
> organize this.

I keep, or generate (as necessary) my profiles in the Model class of
the main table I'm dealing with. I have a get_profile() method that
either returns a canned profile, or dynamically generates one,
depending on what I need to do. Then in my Controller I just say
my $profile = MyApp::M::Library->get_profile or whatever.

I don't know what the MVC gods would say about this, but to my mind,
this has to do with the nature of my data, and thus it's appropriate
to be in the Model.

Jesse Sheidlower



More information about the Catalyst mailing list