develooper Front page | perl.perl5.porters | Postings from April 2001

Re: Relocatable perl

Thread Previous | Thread Next
From:
Graham Barr
Date:
April 30, 2001 08:59
Subject:
Re: Relocatable perl
Message ID:
20010430165637.A28301@pobox.com
On Mon, Apr 30, 2001 at 04:42:05PM +0100, Alan Burlison wrote:
> 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).

Is that the real path to the executable, or the path which it was invoked
by ?

> 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

Seems right to me.

> would I put them?  Globals?

They get put into @INC

>  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.

Just define a special token that gets replaced.

> Is this really worth the effort?

Yes. I remember when I was working at TI. They shipped a kit to customers for
development, but they could not depend on the custmer having the correct version
of perl, so they shipped it with the kit.

However the kit could be installed anywhere, so all scripts had to be wrapped
so they could find the perl executable. It was a mess.

Graham.

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About