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

Replace hardcoded shebang perl path with perl from env #19

Merged
merged 1 commit into from Aug 14, 2018

Conversation

Projects
None yet
3 participants
@paultcochrane
Contributor

paultcochrane commented Aug 13, 2018

Not all systems have perl installed under /usr/local; using the perl
from the environment will hence work more reliably.

Also, the shebang line should be in the first line of the script (see e.g. https://en.wikipedia.org/wiki/Shebang_(Unix)#History) ; I've thus moved the shebang lines that I've changed here that weren't at the top of the file to the top.

Show outdated Hide outdated tk-demos/widget Outdated
Show outdated Hide outdated tk-demos/widget Outdated
@paultcochrane

This comment has been minimized.

Show comment
Hide comment
@paultcochrane

paultcochrane Aug 14, 2018

Contributor

I just pushed an update to the patch to conform to the shebang line you want to have. Hope that does the job correctly.

Contributor

paultcochrane commented Aug 14, 2018

I just pushed an update to the patch to conform to the shebang line you want to have. Hope that does the job correctly.

Show outdated Hide outdated tk-demos/widtrib/plop.pl Outdated
Replace local perl shebang path with system perl
Not all systems have perl installed under /usr/local; using perl should
work more reliably.
@paultcochrane

This comment has been minimized.

Show comment
Hide comment
@paultcochrane

paultcochrane Aug 14, 2018

Contributor

Whoops, sorry. I forgot to remove the use warnings in my last update. Have removed it in this one.

Contributor

paultcochrane commented Aug 14, 2018

Whoops, sorry. I forgot to remove the use warnings in my last update. Have removed it in this one.

@vadrer vadrer merged commit fca5bbc into vadrer:master Aug 14, 2018

@vadrer

This comment has been minimized.

Show comment
Hide comment
@vadrer

vadrer Aug 14, 2018

Owner

thank you! :)

Owner

vadrer commented Aug 14, 2018

thank you! :)

@chrstphrchvz

This comment has been minimized.

Show comment
Hide comment
@chrstphrchvz

chrstphrchvz Aug 15, 2018

Contributor

I had brought these issues up on the mailing list about a month ago, but wasn't sure how to proceed.

I considered adding use warnings anywhere there was a -w in the shebang (assuming the presence of -w indicated the intention for the particular script to work with warnings enabled), for things like tests which typically don't get executed directly. (See https://perldoc.perl.org/warnings.html#What's-wrong-with-*-w*-and-%24%5eW for why to use warnings instead of -w and $^W.)

A common spurious warning seems to be the used only once: possible typo for things from other packages.

Perl/Tk explained its choice of /usr/bin/perl instead of /usr/bin/env perl as being due to a MakeMaker requirement (though before that it was using /usr/local/bin/perl until a debian user reported an issue about it). There's a long and unfinished discussion on getting MakeMaker to replace /usr/bin/env perl. The argument for using that instead of /usr/bin/perl is that the former is what is determined by the PATH while the latter isn't.

Contributor

chrstphrchvz commented Aug 15, 2018

I had brought these issues up on the mailing list about a month ago, but wasn't sure how to proceed.

I considered adding use warnings anywhere there was a -w in the shebang (assuming the presence of -w indicated the intention for the particular script to work with warnings enabled), for things like tests which typically don't get executed directly. (See https://perldoc.perl.org/warnings.html#What's-wrong-with-*-w*-and-%24%5eW for why to use warnings instead of -w and $^W.)

A common spurious warning seems to be the used only once: possible typo for things from other packages.

Perl/Tk explained its choice of /usr/bin/perl instead of /usr/bin/env perl as being due to a MakeMaker requirement (though before that it was using /usr/local/bin/perl until a debian user reported an issue about it). There's a long and unfinished discussion on getting MakeMaker to replace /usr/bin/env perl. The argument for using that instead of /usr/bin/perl is that the former is what is determined by the PATH while the latter isn't.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment