Return-Path: Delivered-To: apmail-perl-modperl-archive@www.apache.org Received: (qmail 268 invoked from network); 5 Dec 2005 04:06:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 5 Dec 2005 04:06:33 -0000 Received: (qmail 39919 invoked by uid 500); 5 Dec 2005 04:06:25 -0000 Delivered-To: apmail-perl-modperl-archive@perl.apache.org Received: (qmail 39905 invoked by uid 500); 5 Dec 2005 04:06:25 -0000 Mailing-List: contact modperl-help@perl.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list modperl@perl.apache.org Received: (qmail 39894 invoked by uid 99); 5 Dec 2005 04:06:25 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 04 Dec 2005 20:06:25 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [207.44.136.25] (HELO plainblack.com) (207.44.136.25) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 04 Dec 2005 20:06:24 -0800 Received: by plainblack.com (CommuniGate Pro PIPE 4.2.9) with PIPE id 2819429; Sun, 04 Dec 2005 22:06:04 -0600 Received: from [67.184.239.85] (account jt@plainblack.com) by plainblack.com (CommuniGate Pro WebUser 4.2.9) with HTTP id 2819419; Sun, 04 Dec 2005 22:05:46 -0600 From: JT Smith Subject: Re: mod_perl 2.0 $r->content and how to integrate GET, POST, multiple select data To: "Ashtanga Yogi" ,modperl@perl.apache.org X-Mailer: CommuniGate Pro WebUser Interface v.4.2.9 Date: Sun, 04 Dec 2005 22:05:46 -0600 Message-ID: In-Reply-To: <20051205013237.1E56CE5C05@ws7-2.us4.outblaze.com> References: <20051205013237.1E56CE5C05@ws7-2.us4.outblaze.com> MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1"; format="flowed" Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org X-Old-Spam-Status: SpamAssassin Failed X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N 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" 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