-----Original Message-----
From: Darko Krizic [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, 11 July 2000 10:56 PM
To: 'Greg Leidreiter'
Subject: RE: The Eagle has landed!
> ServerRoot is /usr/local/apache
> underneath which I have created the lib/perl/Apache tree for holding
> mod_perl modules,
> and dutifully entered the required code in a file called
> Hello.pm in this
> directory.
>
> DocumentRoot is /usr/local/apache/htdocs
>
> in httpd.conf I have added the following:
> ------------------------------
> <IfModule mod_perl.c>
> Include conf/perl.conf
> </IfModule>
> ------------------------------
>
>
> conf/perl.conf looks like this:
> ------------------------------
> PerlRequire conf/startup.pl
> PerlFreshRestart On
>
> <Location /hello/world>
> SetHandler perl-script
> PerlHandler Apache::Hello
> </Location>
>
> -------------------------------
>
> and startup.pl looks like this:
> -------------------------------
> #!/usr/local/bin/perl
>
> print "\n\tstartup.pl is attempting to modify the include
> path...\n\n";
>
> BEGIN {
> use Apache();
> use lib Apache->server_root_relative('lib/perl');
> }
>
> use Apache::Registry
> use Apache::Constants
> use CGI qw(-compile :all);
> use CGI::Carp;
>
> 1;
> ------------------------------
You must add the directory /usr/local/apache/lib/perl to you @INC, for
example like that in your httpd.conf
<Perl>
push @INC,"/usr/local/apache/lib/perl";
</Perl>
If you reference an Module named Apache::MyMod then it is searched as
/usr/local/apache/lib/perl/Apache/MyMod.pm.
...darko
Hmm, while I do appreciate the logic of this approach I remain sceptical for
a number of reasons.
Firstly becuase the Eagle book seems very rigorous to me, and such an
oversight as forgetting to push a path into @INC should have been picked up
well before now. I've never heard mention of this problem... Moreover, Stein
and MacEachern *do* address the issue of having to add another lib path. In
my understanding that's exactly the point of the BEGIN block in startup.pl -
it's just that for some reason this doesn't seem to be getting picked up
properly.
Secondly, when I added the <Perl> push ... directive to perl.conf the server
repeatedly failed to start (which may provide a clue to those of you out
there who know a lot more than I do) even though it came up with Syntax OK
under httpd -t.
Any other suggestions?
Cheers,
Greg.