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

Re: Relocatable perl

Thread Previous | Thread Next
From:
Jarkko Hietaniemi
Date:
May 3, 2001 09:52
Subject:
Re: Relocatable perl
Message ID:
20010503115215.F4815@chaos.wustl.edu
On Thu, May 03, 2001 at 05:35:46PM +0100, Alan Burlison wrote:
> Graham Barr wrote:
> 
> > > That's fine, however it is a different mechanism to that used on Solaris
> > > (and VMS, and Win32...)  Rather than perpetuating a series of
> > > platform-spefific hacks it would be preferable to have a generic
> > > get_exe_path() function and then to do all the other path fixups in a
> > 
> > Do we not have that already ? How is $^X set
> 
> No, that's just set from argv[0] AFAIK.  We need the full path of the
> executable, even when accessed via a symlink.

Last time I looked at this (which is admittedly years ago) I found this
to be one those small things Ritchie et al didn't think of -- and which
has therefore grown to be a sadly unportable mess.  Chasing $ENV{PATH},
never mind how fragile and unreliable that is, is about the only portable
way one can hope to get any reasonable results with.  Various platforms
may have their own special system calls or other tricks, but then we are
in the middle of a #ifdef forest.

> Alan Burlison

-- 
$jhi++; # http://www.iki.fi/jhi/
        # There is this special biologist word we use for 'stable'.
        # It is 'dead'. -- Jack Cohen

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