Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

"indir" in shebang line

by ForgotPasswordAgain (Priest)
on Nov 21, 2017 at 09:28 UTC ( [id://1203868]=perlquestion: print w/replies, xml ) Need Help??

ForgotPasswordAgain has asked for the wisdom of the Perl Monks concerning the following question:

In perlrun, it mentions:
If the #! line does not contain the word "perl" nor the word "indir", the program named after the #! is executed instead of the Perl interpreter.
I found with git that "indir" support was added in a cleanup commit for Perl 5.0 in 1994 and was mentioned in perlrun in 2012. Just out of curiousity, what is "indir" referring to?

Replies are listed 'Best First'.
Re: "indir" in shebang line
by Discipulus (Canon) on Nov 21, 2017 at 09:40 UTC
    uh uh ForgotPasswordAgain what dark corner you encountered!

    This indir shebang thing is handled in toke.c

    I found here that indir was a program to call indirectly other programs:

    If I recall correctly, 'indir' was a program designed to indirectly execute other programs. My recollection is that it was supposed to be + particularly useful in setuid situations where the OS didn't natively provide you much help, and/or perhaps in situations where the OS kerne +l limited you to 32 character command lines. > Personally I wouldn't object to the removal of this exec feature. Bu +t > at the very least shouldn't we document that "indir" thing ? I don't think indir is actively maintained, and we don't recommend doing setuid scripts this way anymore either, so removing the 'indir' special case is probably appropriate.

    L*

    There are no rules, there are no thumbs..
    Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.
      Thanks, that was it exactly. (I really love how you said I encountered a dark corner. :)
Re: "indir" in shebang line
by Anonymous Monk on Nov 21, 2017 at 09:40 UTC
      Thanks, the p5p link is what I was looking for.
A reply falls below the community's threshold of quality. You may see it by logging in.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1203868]
Approved by haukex
Front-paged by haukex
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (6)
As of 2024-04-18 06:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found