This fixed the problems with both Apache2::RequestUtil and Apache2::compat
Thanks!
- Steve
-Original Message-
From: Stas Bekman [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 11, 2005 11:01 AM
To: [EMAIL PROTECTED]
Cc: modperl@perl.apache.org
Subject: Re: [MP2] having trouble
use Apache2::RequestUtil;
my $r = Apache2::RequestUtil->request;
This produces the following error:
Can't locate object method "request" via package "Apache2::RequestUtil"
[...]
LoadModule perl_module modules/mod_perl.so
PerlModule Apache2::compat
AddHandler cgi-script .cgi
AddHandler p
Message>
I'm having trouble getting the request object from mod_perl. Here is the
original attempt:
<
Have you simply tried:
my $r = shift;
at the beginning of your handler? If you're using Apache::Registry, then
your whole file is a handler so you can do that at the top.
Carl
Have you tried to put use Apache2::RequestReq; along with the other use
statements? I ran into the same problem, except that I wanted
Apache2::ServerUtil->server, and that was fixed by including
Apache2::ServerRec as well as Apache2::ServerUtil. I'm not entirely sure
why this is, but it's probably
Title: Message
Sorry, my
last email was sent out without a subject.
I'm having
trouble getting the request object from mod_perl. Here is the original
attempt:
#use
Apache2::RequestUtil;use Apache2::compat;use Apache;
my $r =
Apache->request();
This
generates the following error