You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by "Herrington, Jack" <ja...@Certive.com> on 2000/09/26 04:35:36 UTC
Apache::Request->new() problem
I have the same problem as one of the previous reporters with
Apache::Request->new(). The problem occurs whether I call it after a 'use'
or after a 'PerlModule' load. Perl returns the no 'new' method could be
found for Apache::Request.
My setup is:
Apache 1.3.12
mod_perl 1.24
Perl 6.5
Redhat 6.2
libapreq 0.31
Both Apache::Request and Apache::Cookie exhibit the same symptoms, and
simply running this Perl script:
use Apache::Request;
my $apr = Apache::Request->new( $r );
Gives exactly the same response (as opposed to complaining about the
unititliazed $r).
Is there anywhere I can locate the original Apache::Request all-Perl code?
Jack Herrington
Engineering Manager
Certive - Building the world's first broadband B2B network
(650) 701-8809
Re: Apache::Request->new() problem
Posted by Doug MacEachern <do...@covalent.net>.
On Mon, 25 Sep 2000, Herrington, Jack wrote:
> I have the same problem as one of the previous reporters with
> Apache::Request->new(). The problem occurs whether I call it after a 'use'
> or after a 'PerlModule' load. Perl returns the no 'new' method could be
> found for Apache::Request.
sounds to me like your script is not running under mod_perl.
Apache/Request.pm calls this to bootstrap the xs interface:
__PACKAGE__->mod_perl::boot($VERSION);
if you are not running under mod_perl ($ENV{MOD_PERL} is not set), then
the interface is not bootstrapped. this is done so 'perl -c' can be run
on scripts that 'use Apache::*' with apis only available when running
inside the server.