Form-Processor-Model-DBIC

 view release on metacpan or  search on metacpan

lib/Form/Processor/Model/DBIC.pm  view on Meta::CPAN


The actual update is done in the C<update_model> method.  Your form class can
override that method (but don't forget to call SUPER) if you wish to do additional
database inserts or updates.  This is useful when a single form updates 
multiple tables, or there are secondary tables to update.

Returns false if form does not validate, otherwise returns 1.  Very likely dies on database errors.

=cut

sub update_from_form {
    my ( $self, $params ) = @_;
    return unless $self->validate($params);
    $self->schema->txn_do( sub { $self->update_model } );
    return 1;
}

=head2 model_validate

The place to put validation that requires database-specific lookups.
Subclass this method in your form.

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 1.183 second using v1.00-cache-2.02-grep-82fe00e-cpan-4673cadbf75 )