httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From colin_e <coli...@bigfoot.com>
Subject [users@httpd] Basic stuff- start.pl not affecting @INC
Date Tue, 25 Jan 2005 15:44:12 GMT
Hi Guys. After a long holiday i'm trying to get back into my Perl work, 
and sort out a problem I
saw before Christmas.

Given-

httpd.conf
=======
ServerRoot "C:/Prog/Apache/Apache2"
PerlRequire "conf/start.pl"

C:/Prog/Apache/Apache2/conf/start.pl
==========================
use Apache2 ();
use lib qw(I:/WWW/private/lib);
1;                            # return true

Test Script
=======
#use Apache2 ();
#use lib qw(I:/WWW/private/lib);
use DDAdmin::Main;
$app= DDAdmin::Main->new();
$app->process;


The code as shown fails because it cannot find the library 
"DDAdmin::Main" that sits in
I:/WWW/private/lib/DDAdmin/Main.pm, even though this directory should 
have been
added to the include path with "use lib" in start.pl. The error is:

    Can't locate DDAdmin/Main.pm in @INC (@INC contains: 
C:/Prog/Perl/lib C:/Prog/Perl/site/lib .)
    at I:\\WWW\\private\\res\\testapp\\DDAdmin.pl line 8.

If I uncomment the "use" lines in the test script itself it runs OK, so 
the paths are correct.

If I rename my start.pl to something else I get an apache startup "file 
not found" error ,
and if I change the last line to "0;" instead of "1;" I get a "Can't 
load perl file" error, both
indicating that my start.pl file IS being read and executed  when 
correctly named.

However I can see that neither of the "use" directives in the start.pl 
file are successfully
adding directories to the @INC array, as seen by the script. This is 
pretty basic stuff,
any idea what i am doing wrong?

Regards: Colin



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message