I think this would get you what you want.

my $r = shift;
my %form;
foreach ($r->param) {
   $form{$_} = $r->body($_) || $r->param($_);
}




On Sun, 04 Dec 2005 20:32:37 -0500
 "Ashtanga Yogi" <[EMAIL PROTECTED]> wrote:
In http://www.stonehenge.com/merlyn/LinuxMag/col66.html (a recent intro to mod_perl by Randal Schwartz), he shows how to preserve query parameters which might be listed multiple times by calling $r->content

 use CGI;

 my $q = CGI->new($r->args . $r->content);
 my @name = $q->param("name");

However, ModPerl::MethodLookup shows ->args() as part of RequestRec but not 
->content

For my mod_perl development, I really had no interest in using CGI.pm at all, but, the 2.0 docs on mod_perl don't seem to currently have any examples of getting GET and POST data as well as multiple select query data, so I decided to try this approach. And I certainly don't want a piece-meal approach in mod_perl: I want to make one API call and provide one query parameter and get back what I want, regardless of location.

So, the 2 questions are:

1 - how to get the above method using CGI to work under mod_perl 2.0
2 - how to drop the above method and use something in mod_perl 2.0 which is just as convenient



--
_______________________________________________

Search for businesses by name, location, or phone number.  -Lycos Yellow Pages

http://r.lycos.com/r/yp_emailfooter/http://yellowpages.lycos.com/default.asp?SRC=lycos10



JT ~ Plain Black
ph: 703-286-2525 ext. 810
fax: 312-264-5382
http://www.plainblack.com

I reject your reality, and substitute my own. ~ Adam Savage

Reply via email to