in reply to Using mod_perl on windows

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.

Replies are listed 'Best First'.
Re: Re: Using mod_perl on windows
by Cody Pendant (Prior) on Jul 01, 2003 at 01:31 UTC
    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.

        Request.pm is in c:\Perl\site\Apache\lib and @INC is if printed staright from the browser c:/Perl/lib c:/Perl/site/lib.

        Well there you go.

        @INC does not contain "c:\Perl\site\Apache\lib". push() it in there or do the 'use lib c:\Perl\site\Apache\lib' thing.



        “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