[html-formfu] DBIx-Class-HTML-FormFu nested-params

Mario Minati mario.minati at googlemail.com
Tue Nov 6 21:23:18 GMT 2007


On Tuesday 06 November 2007 10:13:04 Carl Franks wrote:
> On 05/11/2007, Mario Minati <mario.minati at googlemail.com> wrote:
> > I found a bug in populate_from_formfu
> >
> >         if ( $checkbox{$col} && !defined $value && !$is_nullable ) {
> >             $dbic->$col( $col_info->{default_value} );
> >         }
> >         elsif ( defined $value || $checkbox{$col} ) {
> >             $dbic->$col($value);
> >         }
> >
> > It needs to be
> >         $checkbox{ $field->nested_name }
> > instead, which will only work if we sort out $field == undef before.

There is an other one in line 195:
    elsif ( defined $value || $checkbox->{$col} ) {
needs to be 
    elsif ( defined $value || $checkbox->{$nested_name} ) {

I've checked that in.

> >
> > Is
> >         next unless defined $field;
> > ok?

The enhanced  'case' style implementation is fine now.

Greets,
Mario



More information about the HTML-FormFu mailing list