[Dbix-class] Re: How to grep field types?

Bill Moseley moseley at hank.org
Fri May 11 15:58:24 GMT 2007


On Fri, May 11, 2007 at 02:57:23PM +0100, RA Jones wrote:
> I'm beginning to wish I hadn't either, as it's giving me as much grief 
> in development than anything I've used before. I ditched HTML::Widget in 
> favour of it. I did use Data::FormValidator via the 
> CGI::Application::Plugin::ValidateRM, which was nice. What do you use 
> for form building/validating (or don't you do that sort of thing)?


Most of the form modules seem to focus on the html side, and I wanted
to use TT for that.  I was more interested in the form module as an
interface between the database and the application than a way to
generate forms in html.

I put my code on CPAN as Form::Processor, but that was a bit
premature.  First, it's missing a dependency, and I've been meaning to
include an example Catalyst application and TT macros to generate the
html in the distribution.  Plus, it also needs a DBIx::Class "model"
class.  Currently, there's only Form::Processor::Model::CDBI.

I got bogged down in work and have not be able to get back to adding
those parts, yet.

And like most things with Catalyst, I'm now using fewer lines of code
than in the SYNOPSIS.  For example, a method for a user to update
their profile is this:

    sub profile : Path('') {
        my ( $self, $c ) = @_;
        $c->update_from_form( $c->current_user );
    }

Where the template and form module is based on the current action.

But, this has little to do with DBIC.


-- 
Bill Moseley
moseley at hank.org




More information about the Dbix-class mailing list