modperl-cgi_pm_quirks

This is part of The Pile, a partial archive of some open source mailing lists and newsgroups.



To: Tatsuhiko Miyagawa <miyagawa@edge.co.jp>
From: Lincoln Stein <lstein@cshl.org>
Subject: Re: inconsistency between CGI.pm and
Apache::Request
Date: Tue, 6 Nov 2001 15:52:20 -0500

Tatsuhiko Miyagawa writes:
 > On Thu, 1 Nov 2001 09:58:39 -0000 
 > Matt Sergeant <msergeant@startechgroup.co.uk> wrote:
 > 
 > > I guess so. Your above is equivalent to:
 > > 
 > >   $r->param(foo => 'a', b => 'c');
 > > 
 > > (foo => qw(a b c)) doesn't do what it looks like it does, and that's a bad
 > > thing.
 > 
 > I know! but CGI.pm does it, so what I want is interface
 > consistency. CGI.pm also has a named parameter style which
 > Apache::Request doesn't support, like
 > 
 >   $q->param(-name => 'foo', -value => [ qw(a b c) ]);
 >   print join '/', $q->param('foo');  # a/b/c

I'm amazed that CGI.pm does this, but you're right.  What's bad is
that this style doesn't work as expected:

     p $r->param(foo=>[qw(a b c)])

===


the rest of The Pile (a partial mailing list archive)

doom@kzsu.stanford.edu