Jeroen Demeyer on Tue, 11 Jan 2011 20:52:34 +0100


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Path to perl


When grepping the PARI source code for '#!.*perl', I find

doc/gphelp.in:#!@perl@
misc/tex2mail.in:#!@perl@
src/desc/PARI/822.pm:#!/usr/bin/perl -w
src/desc/merge_822:#!/usr/bin/perl -w
src/desc/whatnow:#!/usr/bin/perl -w
src/desc/gen_proto:#!/usr/bin/perl -w
src/desc/doc_make:#!/usr/bin/perl
src/graph/plotport.c:#!/usr/bin/perl

Why this inconsistency?  If you do the trouble of finding out the perl
path, why not use @perl@ everywhere?

An even better solution might be using #!/usr/bin/env perl, which does
not assume a fixed location for perl (useful for binary distributions).
 Unfortunately, with "/usr/bin/env perl" you can't add the -w flag to perl.

This is related to http://trac.sagemath.org/sage_trac/ticket/10559


Cheers,
Jeroen.