zsh-workers
 help / color / mirror / code / Atom feed
From: "François Revol" <revol@free.fr>
To: zsh-workers@zsh.org
Subject: Re: Bang Executing Perl Scripts
Date: Tue, 25 Jan 2011 15:42:20 +0100	[thread overview]
Message-ID: <7CD7FAD1-563E-4FC9-AB38-E5FC94887946@free.fr> (raw)
In-Reply-To: <slrnijtdoo.re7.klaus+usenet@ikki.ethgen.de>


Le 25 janv. 2011 à 12:42, Klaus Ethgen a écrit :

> Moin,
> 
> François Revol <revol@free.fr> schrieb:
>>> Why not putting #!/usr/bin/perl as the first line of your perl scripts?
>> 
>> This is not portable.
> 
> Portable enough today. But if you want to support minor OSs like BeOS or
> windows ...

I wouldn't call BeOS "minor". It might have had a limited diffusion, but it did introduce to the desktop OSes many concepts people now claim that they invented, like tickless, node monitoring...
"BeOS did it 15y ago"

At least you didn't mention Haiku in the list :)

As for Windows, its audience is certainly not minor, despite not having the favors of real hackers (except as a target for study). :)

>> BeOS and Haiku do not have /usr for ex, so perl is elsewhere.
>> (and so is env, so using #!/usr/bin/env perl is just moving the problem around)
> 
> ... look at »perldoc perlrun«:
> #!/bin/sh
> #! -*-perl-*-
> eval 'exec perl -x -wS $0 ${1+"$@"}'
>   if 0;
> 
> There is a pretty good change that /bin/sh is available on relevant
> systems. But also for this solution, you cannot support all exotic
> systems.

Indeed, this would probably work in BeOS in Haiku. But I agree it looks overkill.

François.

  reply	other threads:[~2011-01-25 17:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <Xns9E77D2686F135zzappergmailcom@80.91.229.10>
     [not found] ` <AANLkTimSXtDjkw2DhfxTHWYPSBPpnwnbjPueC0RS-9qJ@mail.gmail.com>
     [not found]   ` <1246B8BF-933E-4143-9B06-62197CE64B94__21660.9615985819$1295907908$gmane$org@free.fr>
2011-01-25 11:42     ` Klaus Ethgen
2011-01-25 14:42       ` François Revol [this message]
2011-01-25 18:55         ` Phil Pennock
2011-01-25 19:38           ` [OT] " François Revol
2011-01-26 13:11         ` Klaus Ethgen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7CD7FAD1-563E-4FC9-AB38-E5FC94887946@free.fr \
    --to=revol@free.fr \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).