in reply to Re: CGI and multipart/form-data
in thread CGI and multipart/form-data

I agree, well, mostly!

The only time I don't use pure templating is creating things like drop-down lists and radio-button groups where I use CGI to generate a simple fragment which I then put into an HTML::Template based template.

jdtoronto

Replies are listed 'Best First'.
Re^3: CGI and multipart/form-data
by jeffa (Bishop) on Aug 29, 2006 at 20:32 UTC

    Indeed, using CGI.pm for such is indeed <UPDATE> very nice. It also handles the problems associated with having a user submit invalid data and having to fill in the values they submitting correctly. </UPDATE> But these days i just make Mason components and use HTML::FillInForm to handle the 'stickiness' issue like so:

    <&| /lib/util/fill_in_form.mas, data => \%ARGS &> <form> <!-- select, text inputs, radio boxes, etc. go here --> </form> </&>
    And the fill_in_form.mas component instantiates the HTML::FillInForm object and ... MAGIC! =D

    jeffa

    L-LL-L--L-LL-L--L-LL-L--
    -R--R-RR-R--R-RR-R--R-RR
    B--B--B--B--B--B--B--B--
    H---H---H---H---H---H---
    (the triplet paradiddle with high-hat)