Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 30 Jan 2005 16:52:01 +0100
From:      Erik Trulsson <ertr1013@student.uu.se>
To:        Matthias Andree <matthias.andree@gmx.de>
Cc:        freebsd-ports@freebsd.org
Subject:   Re: [HEADS UP] perl symlinks in /usr/bin will be gone
Message-ID:  <20050130155201.GB930@falcon.midgard.homeip.net>
In-Reply-To: <m3is5fav5l.fsf@merlin.emma.line.org>
References:  <20050129202425.GA56998@heechee.tobez.org> <20050129220905.46ab86ae.lehmann@ans-netz.de> <m3fz0jtzbc.fsf@merlin.emma.line.org> <20050130030837.GA87780@falcon.midgard.homeip.net> <m3is5fav5l.fsf@merlin.emma.line.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Jan 30, 2005 at 02:44:38PM +0100, Matthias Andree wrote:
> Erik Trulsson <ertr1013@student.uu.se> writes:
> 
> >> Hardcoded paths in scripts are a mess. What if I installed Perl into
> >> /opt/mumble on some other machine? /usr/freeware? /what/ever? Changed
> >> $PREFIX and/or $LOCALBASE?
> >
> > Then you would have nobody but yourself to blame.
> 
> So ports not heeding PREFIX or LOCALBASE aren't buggy? Interesting POV.

That is not what I said (but, no, they are not necessarily buggy
depending on why the they don't heed PREFIX/LOCALBASE.)  
Respecting PREFIX and LOCALBASE is good, but keeping things working is
even better.

> 
> > And what about all the scripts that administrators and users write that
> > are not part of any port?  Scripts that were written according to the
> > de-facto standard that having '#!/usr/bin/perl' on the first line of
> > the script will work correctly.
> 
> As mentioned before, #! /usr/bin/env perl is the canonic SHORT way to
> run perl, longer ways are in perlrun(1).

It might be the canonic way and it might even be the best way, but it
is not the standard way. 

Older versions of perlrun(1) (like the one included in FreeBSD 4.x)
does not even mention /usr/bin/env so don't expect too many scripts to
use it (and the context in which 'env' is mentioned is handling
OS-specific limitations of the #! mechanism.)
perlrun(1) does however say that "When possible, it's good for both
/usr/bin/perl and /usr/local/bin/perl to be symlinks to the actual
binary."


-- 
<Insert your favourite quote here.>
Erik Trulsson
ertr1013@student.uu.se



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050130155201.GB930>