mcorbett has asked for the wisdom of the Perl Monks concerning the following question:

Dear Monks,
you were so brilliant with my last problem I am going to try and enlist your help again.

I porting an app from linux to win32. I am running Apache 1 and perl v5.6.1 on xp using the Activestate port

When I run a script that starts with this piece of code like this

#!perl -w use Apache; use Apache::Request; use Apache::Cookie; my $r = Apache::Request -> new(shift);

It fails and the error.log says this.

Can't locate object method "new" via package "Apache::Request" (perhaps you forgot to load "Apache::Request"?) at c:\apache\cgi-bin\ap.pl line 7.

Edited: by footpad, 30 June 2003
Added <code> and other formatting tags.

edited: Tue Jul 1 13:39:31 2003 by jeffa - title change (was: More help please......)

Replies are listed 'Best First'.
Re: Using mod_perl on windows
by mcorbett (Initiate) on Jun 30, 2003 at 19:03 UTC

    Sorry, did'nt realise it was XML.

    What I meant to say is when I do this

    #!perl -w use Apache; use Apache::Request; use Apache::Cookie; my $r = Apache::Request -> new(shift);

    it does this in the apache errorlog

    Can't locate object method "new" via package "Apache::Request" (perhaps you forgot to load "Apache::Request"?) at c:\apache\cgi-bin\ap.pl line 7.

      Stating the obvious, but is Apache::Request available to you? Is it in the dir where it's expected to be? See what's in @INC, and/or put 'use CGI::Carp qw(fatalsToBrowser);' before your call to use it.

      “Every bit of code is either naturally related to the problem at hand, or else it's an accidental side effect of the fact that you happened to solve the problem using a digital computer.”
      M-J D
        Hi, it should be. Request.pm is in c:\Perl\site\Apache\lib and @INC is if printed staright from the browser c:/Perl/libc:/Perl/site/lib.

        If I goto CPAN and install Apache::Request it states Apache::Request already installed.