You would have guessed right. However, the problem was two fold in my case.

First, I was not calling Apache::Request correctly. The proper method to
call Apache was told to me by Doug Kyle (Giving credit where due!). Below is
how it is done.

<--- Begin Example

my $r = Apache->request;
my $apr = Apache::Request->new($r);

my %params = $apr->args;

print $params{"Player"};

<---- End Example

The 'print $params{"Player"}' would be used to get and print something like
the parameters from the URL of a GET like
"www.example.com/find_player.pl?Player=Mullen" (Not a real site, dont
click!).

Second part of my problem was that I had an error in my Apache::Registry
setup in Apache.conf or perl.conf (Can't remember where I put it). The
script I was running was not being picked up by Apache::Registry and thus
not working.

 Thanks for everyone's help.

PS. The only reason I say this on the mailing list is to get it in to the
mailing list archives because I could not my solution there when I looked.


From: "Doug MacEachern" <[EMAIL PROTECTED]>
To: "Jason Murphy" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, April 11, 2000 8:52 PM
Subject: Re: $r->args troubles...

> On Fri, 7 Apr 2000, Jason Murphy wrote:
> > Can't locate object method "new" via package "Apache::Request" at
> > ./find_player.pl line 10.
>
> that would normally indicate your script is running under mod_cgi, not
> mod_perl.
>
> > my $r = new Apache::Request;  <---Where the error appears
>
> in any case, you need to change that to:
>
> my $r = Apache::Request->new(shift);
> or
> my $r = Apache::Request->new(Apache->request);
>
>

--
 Jason Murphy
 System Administrator
 Lawinfo.com
 1-800-397-3743 ex: 133



Reply via email to