Thanks Chuck, Glenn, and Stas!
On Jun 16, 2004, at 6:53 PM, Goehring, Chuck Mr., RCI - San Diego wrote:
If you were not using mod_perl 1.x in your old cgi programs, you probably don't need to be using any of the request stuff. ModPerl::Registry does all the voodoo for you for ordinary cgi programs.
OK, it sounds like maybe the purpose of ModPerl::Registry is what's tripping me up. After all, both ModPerl and CGI.pm do a lot of things. I've read many times that one "should" use the ModPerl and Apache modules (the "request stuff"?) *instead* of CGI.pm. I've been looking for drop-in replacements for CGI::param and CGI::start_html and even CGI::start_form amd CGI::p.
Although you say that ModPerl::Registry does all the voodoo, your code example includes 'use CGI qw/:standard :html3/;' which indicates to me that the "voodoo" does not include stuff like building forms and handling submissions? Yet a web search shows tens of thousands of examples of Apache::Request code from 1.3 doing that.
So with CGI.pm I did this:
use CGI;
$q = new CGI;
$resultofthe_blah_field = $q->param('blah'); # silly variable name for example
using 1.3 I think I'd do this (just pasted from http://httpd.apache.org/apreq/Apache-Request.html):
use Apache::Request (); my $apr = Apache::Request->new($r); my $value = $apr->param('foo');
...so is there a 2.0 version of this? When I try it like this I get "ModPerl::Registry: Can't locate Apache/Request.pm in @INC"
...or must I keep on using CGI.pm which is purportedly much slower and resource-hungry?
Thanks,
Steve
-- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html