From: Doug Kearns Date: 2002-05-09T16:27:54+09:00 Subject: Re: cgi params api On Thu, May 09, 2002 at 02:39:43PM +0900, Patrick May wrote: > One thing that I don't like is the way cgi forces you to treat every > param as if there were multiples, when most of the time you're dealing > with single params. Although I'm only a very casual user of cgi.rb ... me too. > Here's an idea I had: > > > # query string => "multiple=something&key=value&multiple=somethingelse" > cgi["multiple"] # <= "something" > cgi["multiple"].multiple # <= ["something", "somethingelse"] > > cgi["key"] # <= "value" > cgi["key"].multiple # <= ["value"] > What do you think? Would this be a nicer way of handling cgi params? It's not really grabbing me, although it seems reasonable. Hopefully others will have something more constructive to offer :-) This reminds me of the time Sun tried to deprecate getParameter() leaving only getParameterNames(). There was such a ruckus they were forced to keep it. Regards, Doug