Help needed - mod_perl -Newbee

From: star night (star_night_at_my-deja.com)
Date: 04/20/04

  • Next message: Sherm Pendley: "Re: newbie to perl"
    Date: 19 Apr 2004 18:09:34 -0700
    
    

    I am getting a

    Can't locate HandlerTest.pm in @INC (@INC contains:
    /homes/csw/scripts/perl/test /homes/csw/scripts/perl/test
    /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0
    /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi
    /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl
    /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi
    /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl .
    /usr/local/apache/ /usr/local/apache/lib/perl) at (eval 5) line 3.

    [Mon Apr 1 20:31:09 2004] [error] Undefined subroutine
    &HandlerTest::handler called.

    I think /homes/csw/scripts/perl/test is listed twice because

    I have the following in my httpd.conf

    <Location /handlert>
         PerlRequire /homes/csw/scripts/perl/startup.pl
         SetHandler perl-script
         PerlSetEnv PERL5LIB /csw/anair/scripts/perl/test
         PerlHandler HandlerTest
       </Location>
        
    the content of /homes/csw/scripts/perl/startup.pl is

    use lib qw(/homes/csw/scripts/perl/test);
      1;

    I have HandlerTest.pm defined in /homes/csw/scripts/perl/test

    package HandlerTest;

    sub handler {
        my $r = shift; # Apache session object
        $r->content_type('text/html');
        $r->send_http_header;
        $r->print( "Hello, world." );
    }
    1;

    BTW, I have concluded that PerlSetEnv does not work, since by just
    using PerlSetEnv /homes/csw/scripts/perl/test did not show up when I
    displayed the @INC variable perl-status scripts provided. I am yet to
    remove it from httpd.conf

    Any help is appreciated

    Thanks
    SN

    Apologize for another post on the same issue, there was a typo in the
    post

    PerlSetEnv PERL5LIB /csw/anair/scripts/perl/test
    should be read
    PerlSetEnv PERL5LIB /homes/csw/scripts/perl/test

    Thanks
    SN


  • Next message: Sherm Pendley: "Re: newbie to perl"