httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From colin_e <>
Subject [users@httpd] Re: Basic stuff- not affecting @INC- IGNORE (Fixed)
Date Tue, 25 Jan 2005 16:57:32 GMT
Belay that.

More experimentation with the perl-status module showed that @INC WAS 
being set up,
but my script wasn't seeing it. I finally realised that at some point I 
had configured the script
handler with-

            SetHandler cgi-script

when it should have been-

            SetHandler perl-script

And (reasonably I suppose) it's only perl-script that sets up @INC in 
the environment.

Doh (slaps head).

So sorry for the wasted bandwidth, but at least I answered my own 

Regards: Colin

colin_e wrote:

> 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/"
> C:/Prog/Apache/Apache2/conf/
> ==========================
> 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/, even though this directory should 
> have been
> added to the include path with "use lib" in The error is:
>    Can't locate DDAdmin/ in @INC (@INC contains: 
> C:/Prog/Perl/lib C:/Prog/Perl/site/lib .)
>    at I:\\WWW\\private\\res\\testapp\\ 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 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 file IS being read and executed  when 
> correctly named.
> However I can see that neither of the "use" directives in the 
> 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:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message