My Perl 5.8.0 resides in "/opt/local/bin/". Perl 5.6.0 is in "/usr/bin".
When I start a script with
#!/opt/local/bin/perl -w
use Date::Parse;
I get an error message because "Date::Parse" is in "/Library/Perl/Date"
and my Perl 5.8.0 @INC doesn't contain "/Library/Perl".
I have no problems when I change the script to start with
#!/opt/local/bin/perl -w
use lib qw(/Library/Perl);
use Date::Parse;
but this effectively puts "/Library/Perl" in front of everything in my
5.8.0 @INC array.
My question is this. How do I change my Perl 5.8.0 @INC so that it reads
like
~/where_ever_I_am
/opt/local/lib/perl5/5.8.0/darwin
/opt/local/lib/perl5/5.8.0
/opt/local/lib/perl5/site_perl/5.8.0/darwin
/opt/local/lib/perl5/site_perl/5.8.0
/opt/local/lib/perl5/site_perl
/System/Library/Perl/darwin
/System/Library/Perl
/Library/Perl
...
so that Perl 5.8.0 looks in my "/opt/local/" directories first --- and is
this advisable?
Regards,

Signature
Vic Norton
vic at norton dot name
Drieux - 26 Oct 2003 17:43 GMT
[..]
> My question is this. How do I change my Perl 5.8.0 @INC so that it
> reads
[quoted text clipped - 14 lines]
> is
> this advisable?
there is a simple way to solve this,
and that is to actually build your perl from source
and expressly call out the additional library lines
when asked during the 'configure' phase of building
your site_local version of perl.
there is the minor fly in the ointment, in that
those parts of the 5.6 Perl Modules that rest upon
'compiled binaries' are NOT compatible with the 5.8
release, so you would not want to do what you are
askinf for to begin with.
Those "pure perl" modules that would exist in
the 5.6 tree should either
a. be reconfigured to be in the "/opt/local/lib/...."
section having been built and installed there
b. you should call them out independently as you did
with the
use lib qw(/Library/Perl /System/Library/Perl);
type of approach.
Assuming that the new Panther Release will be using perl 5.8
you may want to re-think some of this.
ciao
drieux
---