Per Einar Ellefsen wrote:
> At 13:30 04.06.2002, m31 wrote:
>
>> Well, I printed out my @INC to screen, and now I have directories
>> that do not exist in it from putting the wrong path in the
>> server_root_relative method, can any-one tell me how to remove this
>> dir from @INC? I treid a few ways but to no sucess.
>
>
> Restart your server? "use lib" doesn't make any permanent changes to
> @INC, these only persist across the httpd mod_perl run. If you restart
> (with the correct code this time), it should be set to the correct value.
>
Per Einar,
Yes, I restarted it. I have @INC printed out to the screen in one of my
test modules, and after a restart the dir's are still there so I opened
up a terminal window and did a:
perl -le 'print join "\n", @INC'
and the dir's I would like to pop off @INC aren't listed but they are
listed in my browser from the module? I now realize that I can't change
my ServerRoot in httpd.conf because then apache won't be able to load
any of its modules at startup (in /usr/libexec/httpd).
So I have three choices....
1.) Get the Apache source, compile and install where I need it. Instead
of the using one that comes with OSX.
2.) move the modules I build for mod_perl somewhere under the /usr
directory. (my doc root is /Library/www/docs Apple sets this up in two
totaly diff tree's)
3.) keep the modules where they are and just push(@INC,
'/Library/www/lib'); instead of using use lib
Apache->server_root_relative('lib/perl'); (actually returns
/usr/lib/perl in stead of what I need, /Library/www/lib/perl)
Well, I'm not sure what I'll do yet, its only a developement machine for
educational purposes thankx for the help
-Justin
Stas Beckman,
Thankx for your help also.
Stas wrote:
Please be more specific. What have you done to @INC so it includes
non-existing dirs? You must have added them. A *short * code fragment is
the best so we can reproduce the problem.
The code snippet for the startup file I used is on one of the other
emails/replies.
I think we've narrowed it down to three choices, but why would my @INC
list one thing from the terminal and another from mod_perl? Are they two
seperate @INC's?