in reply to Re^3: CGI and why?
in thread CGI and why?

It might not be unreasonable to ask this question: "If you are not interested in the params why have them in your form?" You only get form params with Vars() not the CGI object.

One potentially useful thing you don't do but could is to ensure that the values are defined so you avoid warnings if you are using eq, ne or doing an untaint.

my %param; $param{$_} = $q->param($_) || '' for $q->param(); # or a fixed list of + params ;-)

cheers

tachyon

s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print

Replies are listed 'Best First'.
Re^5: CGI and why?
by Aristotle (Chancellor) on Dec 31, 2002 at 23:48 UTC
    People can submit arbitrary information besides the fields I specified on the form, you know. :) It also documents the parameters I expect to have to some degree - much easier to find them all there than search the file for ->param( and much more unlikely that I'll forget to untaint something if I explicitly ask for everything in one place rather than scatter param calls here, there and everywhere. Consider it an approximation of being strict about my form parameters.

    Makeshifts last the longest.