In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Sherm Pendley) wrote:
> On Monday, December 23, 2002, at 11:49 PM, David H. Adler wrote: > > >> instance. So I consider /sw/lib/perl5/ just another directory for > >> /usr/bin/perl to search through, not a Fink-apps-only directory. > > > > Even so, should it really be the *first* thing in @INC for everything? That's the way PERL5LIB works. :-) > I avoid Fink-installed Perl modules like the plague. Why? Because the > PERL5LIB environment variable that Fink sets is read by all versions of > Perl, but the modules that Fink installs into /sw/lib/perl5 will only > work with 5.6.0. Fink is a very useful way to install some problematic > modules to use with 5.6.0, but it doesn't deal well with having multiple > versions of Perl installed at the same time. > > If you've installed 5.8.0, you can continue to use Fink-installed > modules in scripts that explicitly specify #!/usr/bin/perl5.6.0. To do > so, you'll need to remove the PERL5LIB variable from your environment, > and use "use lib" in those scripts to add the Fink module directory > instead. This is what I did. I add "PERL5LIB=" to my .bash_profile after source /sw/bin/init.sh, so I don't use the one set by fink. I could modify /sw/bin/init.sh, but I don't want to bother. It's not needed, because fink does a use lib "..." anyway (you shouldn't need to add it; if you do for any script, submit a bug report or patch to the fink people so it is in their version). So I only use fink perl modules for fink stuff. I keep my perl in /usr/local, I keep the system perl where it is, and I keep fink's perl modules where they are, all in their own little boxes, none knowing of one another (except for fink's perl modules knowing of the system perl). > Note that, if you have multiple Perls on your system, you may need to > twiddle the /usr/bin/perl symlink to point to the version you're > currently installing modules for. I've encountered problems installing > modules that insist on using /usr/bin/perl, regardless of the fact that > I configured them with (for example) "/usr/bin/perl5.8.0 Configure.PL". > That's only a problem during the actual installation process - once > you're done installing modules, it's safe to make /usr/bin/perl a link > to whatever version you want to use as your default. The way the #! line should work is not that it looks at $^X but that it looks at $Config{startperl}. So if your startperl is #!/usr/bin/perl, that's what it should use. If your startperl is #!/usr/bin/perl5.8.0, then that's what it should use. It can't just look at $^X because some systems need more than just a basic Unix #! line. I suppose using $^X would not be horribly wrong, but if it is ignoring both $^X and startperl and just using a hardcoded string or some separate heuristic, it's probably broken. -- Chris Nandor [EMAIL PROTECTED] http://pudge.net/ Open Source Development Network [EMAIL PROTECTED] http://osdn.com/