-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Patch bin scripts to support the #! Makefile.PL was invoked with #114
Conversation
Codecov Report
@@ Coverage Diff @@
## master #114 +/- ##
======================================
Coverage 21.5% 21.5%
======================================
Files 71 71
Lines 19914 19914
Branches 5728 5728
======================================
Hits 4283 4283
Misses 14922 14922
Partials 709 709
Continue to review full report at Codecov.
|
|
Which breaks building in a different path than deploying to. |
|
I'll give you a real work example. Let's say you install SQL::Translator to your perl in /usr/local. The assumption is that if I run /usr/local/bin/sqlt-diff, it'll work. However if my $PATH is set to pick perl out of /usr/bin first, then the script will fail because SQL::Translator was not installed to that perl. So you want ExtUtils::MakeMaker to update the #! of all of the scripts during make install to point to the path of the perl they were installed to. It will not do this unless your #! is /usr/bin/perl in cpan distro. |
|
I know that behaviour and it annoys me very much. We build our Perls using |
|
We're probably having this discussion in the wrong place but IMO given the history of how EUMM adjusts #!, it seems like the better thing to do would be to add a feature to EUMM to customize the #! to whatever you choose via an ENV var or some other means. Possibly even by having it check for The key is that EUMM should be consistently updating #! for all scripts it installs into bin. I should be able to specify what #! needs to be to EUMM. Instead what's happening right now is that we're all being left unhappy, depending on what method we prefer (some CPAN modules do env and some don't). |
|
@abraxxa BTW, this discussion is ongoing at: Perl-Toolchain-Gang/ExtUtils-MakeMaker#58 |
|
Using #!/usr/bin/env perl as the shebang breaks installation for nearly everyone else (whether they find out immediately or later), because it won't use the perl that the CPAN installer ensured satisfies the dependencies for this distribution. This is the reality of the situation currently. |
|
Im hoping to do a release soon, and would like to merge easy issues to help give the impression that there'll be active maintenance. I think that changing the shebangs is the right thing, but discussion on IRC has led me to believe that Any objections? |
|
As said before that breaks relocateable Perls where the |
|
In my opinion, breaking in standard installations is more critical than breaking in relocatable installations, which is why the shebang fix is utilized by nearly all CPAN scripts. Clearly it is not a perfect fix (and the referenced EUMM issue stalled out before anyone did the work) but relocatable installations are very much an advanced usage of perl and such users will need to deal with this issue regardless - I don't think it's appropriate to require the vast majority of users to also deal with it. |
setting it to #!perl makes EUMM update the #! during install
|
I've updated the PR to match your decision. This also solves my problem. |
|
sorry for the delay, thanks for the PR! |
setting it to /usr/bin/perl makes EUMM update the #! during install