Many of us are familiar with the following problem: user installs perl 5.8.0This has been a problem for me, too, and I installed my own copy of 5.8.0 independent of Apple. The problem extends beyond Storable to all non-5.8.0-compliant modules.
replacing the apple-installed 5.6.0 (by following instructions on apple's
website, for example), fink stops working because it uses Storable.pm
which was compiled against 5.6.0, user either asks for help on fink lists,
or trashes fink on macslash.
I am hoping that Apple eventually does The Right Thing and installs a version
of perl which properly accomodates versioning. But it would be great if
Fink could do something to improve the current situation, in the meantime.
One possibility is to compile our own perl during bootstrap, and then
run fink with /sw/bin/perl. I don't think this is the ideal solution.
Another possibility is to acknowledge the fact that, although Fink was
designed for perl 5.6.0, some users may be running it under 5.8.0.
As I understand it, Storable.pm is built-in to 5.8.0, right? So can't
we wrap the code which calls Storable.pm in some test which says:
if running under 5.6.x, call Storable.pm, if running under 5.8.0 use
the built-in?
I think it isn't an Apple problem; it's a fink one. PERL5LIB needs to be set in /sw/bin/init.sh to point to a fink directory appropriate for the version of perl in use. This unfortunately means that some modules should be moved from /sw/lib/perl5 and /sw/lib/perl5/darwin to /sw/lib/perl5/5.6.0 and /sw/lib/perl5/5.6.0/darwin . A fink package could be created to install any "core" version-sensitive fink modules for 5.8.0 users.
If the files were moved or at least the version-dependent files were put in /sw/lib/perl5/5.8.0 so they would be found before the 5.6.0 version, /sw/bin/init.sh could have this tacked on:
if which perl > /dev/null
then
PERL_VERSION=`perl -e 'printf "%vd", $^V'`
PERL5LIB="/sw/lib/perl5/$PERL_VERSION:$PERL5LIB"
# else
# error?
fi
John B
PGP.sig
Description: PGP signature
