Front page | perl.perl5.porters |
Postings from April 2001
Relocatable perl
Thread Next
From:
Alan Burlison
Date:
April 30, 2001 08:42
Subject:
Relocatable perl
Message ID:
3AED87CD.DB799C75@uk.sun.com
Solaris will have two new features that may make it possible to finally
achieve the Holy Grail of a truly relocatable perl. The first of these is
the ability to refer to a library with a path that is relative to the
executable (removing the need for LD_LIBRARY_PATH hackery) and the second is
the ability to find out the path of the executable from inside the
executable (removing the need for PERL5LIB hackery).
I've been trying to figure out what sort of stuff would need changing to
make this work. At first I just thought that the equivalent of setting
PERL5LIB would do, but a bit of searching around uncovered the following
#defines that refer to the perl install location, and that are used in the
source:
ARCHLIB_EXP
BIN_EXP
PRIVLIB_EXP
SITEARCH_EXP
SITELIB_EXP
SITELIB_STEM
I suspect that to make this work I'd have to make all of those #defines into
dynamic strings, and tweak them at startup. Does this seem correct? Where
would I put them? Globals? This would only work if the above variables all
had a common directory prefix - if someone decided for some reason to tell
Configure they wanted SITELIB_EXP on a completely different filesystem there
would be no common directory prefix to twiddle.
Is this really worth the effort?
Alan Burlison
Thread Next
-
Relocatable perl
by Alan Burlison