develooper Front page | perl.perl5.porters | Postings from February 2012

Why are shebangs with "indir" in them treated specially?

Thread Next
From:
Ævar Arnfjörð Bjarmason
Date:
February 5, 2012 10:55
Subject:
Why are shebangs with "indir" in them treated specially?
Message ID:
CACBZZX7mqbkU2jUo4C0nP2-m-E71bMW-EL8q9avEJoQmqqx+qA@mail.gmail.com
The reason we do this:

    $ cat >indirectly.pl
    #!indirectly
    print "hello world\n";
    ^C
    $ cat >directly.pl
    #!directly
    print "hello world\n";
    ^C
    $ perl directly.pl
    Can't exec directly at directly.pl line 1.
    $ perl indirectly.pl
    hello world

Is because we ignore the shebang if it contains the string "indir",
we've been doing that since perl 5.0 alpha 8[1], does anyone know why?
Maybe this odd edge case can just be removed.

1. https://github.com/mirrors/perl/commit/2304df6#diff-127

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About