in reply to CGI and multipart/form-data

This suggestion, of course, does not answer your question ... but maybe now would be a good time to consider switching to a templating solution:

I rarely (if ever) use CGI.pm to produce HTML anymore -- templating simply offers more control.

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)

Replies are listed 'Best First'.
Re^2: CGI and multipart/form-data
by jdtoronto (Prior) on Aug 29, 2006 at 20:28 UTC
    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

      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)