perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lincoln Stein <lst...@cshl.org>
Subject Re: inconsistency between CGI.pm and Apache::Request
Date Tue, 06 Nov 2001 20:52:20 GMT
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)])

Lincoln

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
 > 
 > 
 > 
 > --
 > Tatsuhiko Miyagawa <miyagawa@bulknews.net>

-- 
========================================================================
Lincoln D. Stein                           Cold Spring Harbor Laboratory
lstein@cshl.org			                  Cold Spring Harbor, NY

NOW HIRING BIOINFORMATICS POSTDOCTORAL FELLOWS AND PROGRAMMERS. 
PLEASE WRITE FOR DETAILS.
========================================================================

Mime
View raw message