perlpunk / perl5-module-meta

Best Practices for Perl5 CPAN Modules Metadata
MIT License
18 stars 2 forks source link

Shebang: why avoid #!/usr/bin/env perl and #!perl? #7

Closed cxw42 closed 4 years ago

cxw42 commented 4 years ago

Tina, CXW here - thanks for putting this list together! This issue is a request for additional explanation.

The shebang section suggests #!/usr/bin/perl. How does this interact with perlbrew? Perlbrew, at the bottom of the page, says env is probably OK, except for CentOS.

I see that Perl-Toolchain-Gang/ExtUtils-MakeMaker#58 discusses shebang-rewriting, and that env currently isn't rewritten. Is that the main reason for sticking with /usr/bin/perl? Are there other factors to be aware of, especially if they affect future portability?

Would you be willing to expand the document a bit to explain the reasons, or to clarify that EUMM rewriting is the reason? Thank you for considering this request!

perlpunk commented 4 years ago

Yes, the reason is that env perl is not rewritten. Only if the program ends with perl it is rewritten. I can add an explanation, and also link to the issue, thanks =)

perlpunk commented 4 years ago

I added an explanation