I think I know what's happening here. Your script is running as a CGI, not
as mod_perl. Check:

  print "not " unless $ENV{MOD_PERL};
  print "running under mod_perl\n";

Matt.
-- 
<:->Get a smart net</:->

> -----Original Message-----
> From: Paul Makepeace [mailto:[EMAIL PROTECTED]]
> Sent: 14 December 2001 08:53
> To: Ged Haywood
> Cc: Anand R; [EMAIL PROTECTED]
> Subject: Re: Can't call Apache::Request->new()
> 
> 
> On Fri, Dec 14, 2001 at 08:31:26AM +0000, Ged Haywood wrote:
> > Hi there,
> > 
> > On Fri, 14 Dec 2001, Anand R wrote:
> > 
> > > The Request Object contains info sent to the server in 
> the client's request.
> > [snip]
> > > Maybe this should not a big problem,U just have to have a 
> look at the
> > > Apache Doc.
> > 
> > I think he's trying to say
> > 
> > perldoc Apache::Request
> 
> Hmm, I was hoping I was way beyond that!
> 
> Perhaps I'm not being clear -- I'm use'ing a module and calling a
> documented method and then perl is claiming the module isn't loaded. I
> showed a command line that demonstrated this (& that the module is
> installed) and then said it also happened when under mod_perl. To go
> into even more detail, here is how I'm calling it under mod_perl. I'm
> new to this so quite possibly the mistake's somewhere here...
> 
> httpd.conf:
> 
> <Files /perl-bin/*.cgi>
>    SetHandler perl-script
>    PerlHandler Apache::Registry
>    Options +ExecCGI
>    PerlSendHeader On
> </Files>
> 
> 
> apr.cgi:
> 
> #!/usr/bin/perl -Tw
> use strict;
> 
> use Apache::Request;
> 
> my $r = shift;
> my $apr = Apache::Request->new($r);
> my @params = $apr->param;
> 
> print <<HTML;
> Content-type: text/plain
> 
> @params;
> HTML
> 
> 
> And sho' nuff ...error.log contains,
> 
> Can't locate object method "new" via package 
> "Apache::Request" (perhaps you forgot to load 
> "Apache::Request"?) at /home/wwwrp/perl-bin/apr.cgi line 7.
> [Fri Dec 14 00:43:14 2001] [error] [client 172.30.0.3] 
> Premature end of script headers: /home/wwwrp/perl-bin/apr.cgi
> 
> > :)
> > 
> > 73,
> > Ged.
> > 
> > PS:  Cute email address Paul.
> 
> Heh thanks -- no prizes for guessing which device file x10.com@
> goes to :-)
> 
> 55,
> Paul
> 
> -- 
> Paul Makepeace ....................................... 
http://paulm.com/

"What is the meaning of life? The unforgiven."
   -- http://paulm.com/toys/surrealism/

________________________________________________________________________
This email has been scanned for all viruses by the Star Internet Virus
Screen.
The service is provided in partnership with MessageLabs, the email security
company.
For more information on a higher level of virus protection visit
www.star.net.uk
________________________________________________________________________

_____________________________________________________________________
This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit http://www.star.net.uk/stats.asp or alternatively call
Star Internet for details on the Virus Scanning Service.

Reply via email to