> On Thu, 6 Jun 2002, Bill Moseley wrote:
>
> > Anyone have links to examples of MVC Perl code (mostly controller code)
> > that does a good job of M and C separation, and good ways to propagate
> > errors back to the C?

I'm working on my own impelmentation at the moment and am planning to have
a mechanism in my unoverridden forms controller subclass which hosts
methods which can validate data based on types derrived from the form's
input names, together with a set of valid fields.  For more complex
validation I'm planning on subclassing and overloading these methods.

The validation routines get called if there is a '_validate' field and
these in turn generate an errors structure which gets fed to the View's
view of the model.  I have a seed method in my controller which determines
the execution order, however what it does is call other seeds in the model
layer.  If all is cool, it does an internal redirect to the next page as
supplied in a hidden field - or determined at runtime.

You'll have to excuse me for the mubling, but my face is currently being
stuffed full of falafal. :)  Try some?

Fiq.










Reply via email to