"Mark T. Dame" wrote:
> 
> Hello all.
> 
> According to the docs for Apache::ASP
> (http://www.nodeworks.com/asp/config.html#Global), the Global directory
> and the IncludesDir directory will be added to @INC so you can 'use' and
> 'require' perl modules in these directories.  This doesn't seem to be
> working for me.
> 
> I have a simple ASP file:
> 
> <html>
> <head>
> <title>Test</title>
> </head>
> <body>
> 
> <%
>   use TestModule;
> 
>   my $r = Apache->request;
>   my $c = $r->connection;
> 
>   my $host = $c->remote_host;
>   my $user = $c->user;
> %>
> 
> Host: <%=$host%><br>
> User: <%=$user%><br>
> 
> </body>
> </html>
> 
> TestModule.pm is in /var/www/htdocs/asp.  This script fails with:
> 
> [Tue Apr 11 13:10:51 2000] [error] [asp] [12553] [error] Can't locate
> TestModule.pm in @INC (@INC contains: /var/www/perllib /var/www/perllib
> /var/www/perllib /usr/lib/perl5/5.00503/i386-linux
> /usr/lib/perl5/5.00503 /usr/lib/perl5/site_perl/5.005/i386-linux
> /usr/lib/perl5/site_perl/5.005 . /usr/local/ /usr/local/lib/perl) at
> (eval 187) line 8. <--> BEGIN failed--compilation aborted at (eval 187)
> line 8. <--> , /usr/lib/perl5/site_perl/5.005/Apache/ASP.pm line 1180
> 
> If I add this right before the 'use TestModule;'
> 
> use lib "/var/www/htdocs/asp";
> 
> It works fine.
> 
> I'm using Apache::ASP version 0.18, perl 5.005_03, mod_perl 1.21, and
> Apache version 1.3.9.
> 
> Anyone have any ideas?

I guess I should have added my .htaccess file too.  Here's the relevant
part:

PerlSetVar Global /var/www/htdocs/asp
PerlSetVar StateDir /var/www/aspstate
PerlSetVar StateDB DB_File
PerlSetVar StatINC 1
PerlSetVar CookiePath /
PerlSetVar UseStrict 1

<Files ~ (\.asp)>
SetHandler perl-script
PerlHandler Apache::ASP
</Files>


-m
-- 
## Mark T. Dame:  mailto:[EMAIL PROTECTED]
## WWW:  http://www.mfm.com/~mdame/
## MFM Communication Software:  http://www.mfm.com/
"The future has arrived; it's just not evenly distributed."
     -- William Gibson

Reply via email to