Discussion:
perl links
(too old to reply)
Aiza
2010-04-09 23:14:48 UTC
Permalink
When installing perl i see 2 links between /usr/local/bin and /usr/bin.
Is this still required or is it something left over from when perl was
part of the base system?

symlinking /usr/local/bin/perl5.8.9 and /usr/bin/perl
symlinking /usr/local/bin/perl5.8.9 and /usr/bin/perl5
Chuck Swiger
2010-04-09 23:22:49 UTC
Permalink
When installing perl i see 2 links between /usr/local/bin and /usr/bin. Is this still required or is it something left over from when perl was part of the base system?
symlinking /usr/local/bin/perl5.8.9 and /usr/bin/perl
symlinking /usr/local/bin/perl5.8.9 and /usr/bin/perl5
This is to compensate for Perl scripts which assume they know where the path to the interpreter is, rather than using env....

Regards,
--
-Chuck
Erik Trulsson
2010-04-09 23:28:24 UTC
Permalink
Post by Aiza
When installing perl i see 2 links between /usr/local/bin and /usr/bin.
Is this still required or is it something left over from when perl was
part of the base system?
symlinking /usr/local/bin/perl5.8.9 and /usr/bin/perl
symlinking /usr/local/bin/perl5.8.9 and /usr/bin/perl5
It is still required (at least the first one.) It is there to be
compatible with a very large number of existing Perl scripts which
assume that the Perl interpreter can be found as /usr/bin/perl

This has nothing do to with when Perl was part of the base system - it
is a Perl convention which was established before FreeBSD (or Linux for
that matter) even existed.
--
<Insert your favourite quote here.>
Erik Trulsson
***@student.uu.se
Anton Yuzhaninov
2010-04-10 10:34:26 UTC
Permalink
On Sat, 10 Apr 2010 07:14:48 +0800, Aiza wrote:
A> When installing perl i see 2 links between /usr/local/bin and /usr/bin.
A> Is this still required or is it something left over from when perl was
A> part of the base system?
A>
A> symlinking /usr/local/bin/perl5.8.9 and /usr/bin/perl
A> symlinking /usr/local/bin/perl5.8.9 and /usr/bin/perl5

most perl scripts begins with

#!/usr/bin/perl

this is common convention (also outside *BSD world)
--
WBR,
Anton Yuzhaninov
Randal L. Schwartz
2010-04-10 11:27:35 UTC
Permalink
Anton> most perl scripts begins with

Anton> #!/usr/bin/perl

Anton> this is common convention (also outside *BSD world)

In fact, it's the recommendation from the original Camel book in 1990
(which I wrote, but the kids forget that :) that no matter where you
install Perl, you always link/symlink /usr/bin/perl so that scripts can
safely use shebang.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<***@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion
Randal L. Schwartz
2010-04-10 16:26:33 UTC
Permalink
parv> So, you are the guilty one. By that logic, every software should
parv> assume some location, so that people can have fun with link farm
parv> maintainance.

Keep in mind, the scene has changed in 20 years. :)
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<***@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion
Charlie Kester
2010-04-10 18:05:52 UTC
Permalink
Post by Randal L. Schwartz
parv> So, you are the guilty one. By that logic, every software should
parv> assume some location, so that people can have fun with link farm
parv> maintainance.
Keep in mind, the scene has changed in 20 years. :)
Has your advice on this point also changed?

p***@pair.com
2010-04-10 16:27:03 UTC
Permalink
in message <***@red.stonehenge.com>,
wrote Randal L. Schwartz thusly...
Post by Randal L. Schwartz
Anton> most perl scripts begins with
Anton> #!/usr/bin/perl
Anton> this is common convention (also outside *BSD world)
In fact, it's the recommendation from the original Camel book in 1990
(which I wrote, but the kids forget that :) that no matter where you
install Perl, you always link/symlink /usr/bin/perl so that scripts can
safely use shebang.
So, you are the guilty one. By that logic, every software should
assume some location, so that people can have fun with link farm
maintainance.


- parv

--
Loading...