[html-formfu] Populate form using a complex hashref?

Moritz Onken onken at houseofdesign.de
Sun Mar 8 15:56:42 GMT 2009


Am 08.03.2009 um 16:54 schrieb Moritz Onken:

>
> Am 03.03.2009 um 17:04 schrieb Moritz Onken:
>
>>
>> Am 03.03.2009 um 12:48 schrieb Carl Franks:
>>
>>> 2009/3/3 Moritz Onken <onken at houseofdesign.de>:
>>>> I think this can be part of FormFu itself and should not be an  
>>>> extra module
>>>> on CPAN.
>>>> There is one additional requirement: Hash::Flatten. But from what  
>>>> I can tell
>>>> this seems to be a rock solid module, written by BBC.
>>>>
>>>> Have fun and tell me what you think!
>>>>
>>>> The test explains most its functionality
>>>
>>> I'm ok with it being in the core HTML-FormFu module,
>>> though I'd rather it stuck with formfu's conventions for building
>>> accessors and overriding methods.
>>> Eventually, formfu might use Moose, but until then, I'd rather keep
>>> the codebase consistent.
>>>
>>> Could you also split the tests out into multiple files, each named  
>>> to
>>> describe what it's testing?
>>>
>>> If you could address both those points, I'll be more than happy to  
>>> commit it.
>>>
>
> For HashRef to work properly I need a method to unset the values of  
> each field.
> I tried that with:
>
> map { eval { $_->default(undef)  } } (grep { $_->is_field } @{$form- 
> >get_all_elements});

Well, the eval {} was to catch the error from the Date field. Should  
not be there
in the final code.



More information about the HTML-FormFu mailing list