in reply to (CGI::Vars) Re: Variable Variables
in thread Variable Variables

Actually, his code didn't have that particular flaw. He only creates the variables in his array. But your point is good, its something people need to think about.

I also like the $query->Vars(); suggestion. never seen that before. cool :-)

Replies are listed 'Best First'.
Re: Re: (CGI::Vars) Re: Variable Variables
by mwp (Hermit) on Dec 05, 2000 at 07:55 UTC
    Thanks. Vars() is relatively new, around CGI.pm 2.50 if I remember correctly.

    I understand what you're saying... he only creates the variables in the list he defines for the foreach loop. I guess what I was trying to imply was that whomever edits the form and adds a field is going to have to come into the CGI script and modify that too, creating the situation I described. =) You would hope the programmer in question would realize their folly and change the formfield name so that it wouldn't break the script, but never forget O'Toole's postulate: Murphy was an optimist.