[jifty-devel] weird shebang in jifty

Andreas J. Koenig andreas.koenig.7os6VVqR at franz.ak.mind.de
Sun May 20 01:05:03 EDT 2007


>>>>> On Sat, 19 May 2007 15:02:31 -0400, Jesse Vincent <jesse at bestpractical.com> said:

  > On May 19, 2007, at 3:43 AM, Andreas J. Koenig wrote:

 >> % head -3 /usr/local/perl-m-5.8.0 at 31162/bin/jifty
 >> #!/usr/bin/env perl
 >> use warnings;
 >> use strict;
 >> 
 >> 
 >> I'm surprised why jifty has this shebang line that calls the wrong
 >> perl for people who have more than one perl around.
 >> 
 >> Is this intentional or an accident?
 >> 

  > That's a fairly standard idiom for "use the first perl in my path."
  > This is particularly important to those of us who have multiple perls
  > installed locally, like say, on OSX.


  > I'm open to better ideas, htough.

I don't understand what the problem is. If you're using the standard
shebang line and use the first jifty in your path, everything does
work out right, no? Does OSX have a special bug I don't know about?

I have 159 scripts from CPAN installations in my $Config{bin} which
use the standard shebang line. I can use them all because they make
sure that they are run by the perl they were built with.

I never before realized that I have 4 scripts that use the env idiom.
Two of them use the wrong path to env anyway so are broken completely.
See what the two leftovers say:

% /usr/local/perl-m-5.8.0 at 31162/bin/stubmaker.pl     
Can't locate SOAP/Lite.pm in @INC (@INC contains: /usr/local/perl-5.8.7/lib/5.8.7/i686-linux-64int /usr/local/perl-5.8.7/lib/5.8.7 /usr/local/perl-5.8.7/lib/site_perl/5.8.7/i686-linux-64int /usr/local/perl-5.8.7/lib/site_perl/5.8.7 /usr/local/perl-5.8.7/lib/site_perl .) at /usr/local/perl-m-5.8.0 at 31162/bin/stubmaker.pl line 14.
BEGIN failed--compilation aborted at /usr/local/perl-m-5.8.0 at 31162/bin/stubmaker.pl line 14.

% /usr/local/perl-m-5.8.0 at 31162/bin/jifty       
Can't locate UNIVERSAL/require.pm in @INC (@INC contains: /usr/local/perl-5.8.7/lib/5.8.7/i686-linux-64int /usr/local/perl-5.8.7/lib/5.8.7 /usr/local/perl-5.8.7/lib/site_perl/5.8.7/i686-linux-64int /usr/local/perl-5.8.7/lib/site_perl/5.8.7 /usr/local/perl-5.8.7/lib/site_perl .) at /usr/local/perl-m-5.8.0 at 31162/bin/jifty line 5.
BEGIN failed--compilation aborted at /usr/local/perl-m-5.8.0 at 31162/bin/jifty line 5.


No surprise for me because I did not use the first perl in my path to
build jifty. For me this is broken behaviour.

What happens for you if you let MakeMaker write the standard shebang line?

-- 
andreas


More information about the jifty-devel mailing list