[Catalyst] Patch for a possible HTML::Widget bug in $result->params()

Carl Franks fireartist at gmail.com
Fri Mar 24 17:46:33 CET 2006


That seems reasonable!
It's now fixed in the subversion trunk.

Thanks,
Carl


On 24/03/06, Michele Beltrame <mb at italpro.net> wrote:
> Hello!
>
> Using HTML::Widget I noticed that if in my result object I have
> $result->{_params} such as this:
>
>     'idimportance' => '1',
>     'description' => undef,
>     'ibegin' => '2006-03-24 10:00'
>     'idtype' => [
>         '3',
>         '4'
>     ]
>
> by calling $result->params() I get this:
>
>     'idimportance' => '1',
>     'description' => undef,
>     'ibegin' => '2006-03-24 10:00'
>     'idtype' => 3
>
> That is, in the case of multiple selects or checkboxes, I get only the
> first value.
>
> I looked into the HTML::Widget::Result.pm code and I notices that the
> params() method calls param() to retrieve each valid parameter. The
> problem is param(), in case of multiple values, does not return an
> arrayref, but just an array, so the caller just stores the first one. I
> created a patch, which I attach to this message, which solves the
> problem. I don't know if it's right (that is, it doesn't break some
> other things), but it seems to work. ;-)
>
> Michele.
>
> --
> Michele Beltrame
> http://www.varlogarthas.net/
> ICQ# 76660101
> Informativa privacy: http://www.italpro.net/em.html
>
>
> _______________________________________________
> Catalyst mailing list
> Catalyst at lists.rawmode.org
> http://lists.rawmode.org/mailman/listinfo/catalyst
>
>
>
>



More information about the Catalyst mailing list