Skip Menu |

This queue is for tickets about the Module-CPANTS-Analyse CPAN distribution.

Report information
The Basics
Id: 84921
Status: stalled
Priority: 0/
Queue: Module-CPANTS-Analyse

People
Owner: Nobody in particular
Requestors: ether [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: (no value)



Subject: New kwalitee metric: look for invalid shebangs in executables
Look for executables in directories that will be installed (in Makefile.PL, this can be found in the EXE_FILES key), and check their shebang line - it should not be #!perl or #!/usr/bin/env perl. today's discussion on #plack, which summarizes the issue and gives a link to current dists that have bad shebang lines: 14:42 < frew> miyagawa: so I figured out the starman problem, but you recently modified what caused the problem in git, though it still doesn't work for me 14:43 < frew> miyagawa: basically, #!/usr/bin/perl doesn't play nice with perlbrew'd perls (obv) 14:43 < frew> miyagawa: now you have #!perl, which doesn't seem to work at all 14:43 < revmischa> i always do /usr/bin/env perl 14:43 < frew> revmischa: me too 14:44 < frew> revmischa: that was gonna be my recommendation 14:44 < frew> except that the recent change to #!perl must mean something :) 14:45 * frew sends pull req 14:46 < ether> #!/usr/bin/perl is rewritten to the installation perl by EUMM at 'make install' time 14:46 < ether> I have no idea of Module::Build does something similar 14:47 < frew> well it was always wrong for me :) 14:47 < doy> installed scripts should never use /usr/bin/env perl 14:47 * frew reinstalls 14:48 < doy> the eumm behavior of rewriting the line to point to the perl that the script is installed for is the right one 14:48 < doy> this may be a feature that Module::Build::Tiny doesn't have yet (starman isn't using Module::Build) 14:49 < frew> ok 14:49 < frew> the latest version works 14:49 < frew> thanks to MB I guess 14:49 < frew> thanks doy 14:52 < doy> ah, yeah, that was just fixed in the latest Module::Build::Tiny 14:52 < doy> https://github.com/Leont/module-build-tiny/issues/3 14:54 < sri> what a huge fucking mess... http://grep.cpan.me/?q=%2Fusr%2Fbin%2Fenv+perl 14:54 < frew> timeout. 14:55 < sri> (spoiler: it's 1000+ results) 14:55 < frew> sri: how many for http://grep.cpan.me/?q=%2Fusr%2Fbin%2Fperl 14:56 < sri> looks like the server got #plack'd :o 14:57 < frew> well, I'd MUCH rather usr bin env than just usr bin perl 14:57 < frew> the latter is crazy wrong 14:57 < doy> the former is just as wrong 14:57 < ether> sounds like there should be a kwalitee rating on that 14:57 < sri> it's all wrong \o/ 14:57 < frew> doy: how so? the former will work so much more often 14:57 * ether files a wishlist ticket for that right now;) 14:58 < doy> it'll still break quite frequently, because it's still not doing what you actually want 14:58 < doy> /usr/bin/env perl is better for scripts that you'll never install 14:58 < perigrin> it's picking whatever perl you have in your environment ... not the one $script was built against ... no? 14:58 < doy> but anything that is installed should be pointing at the perl that it is installed for 14:58 < doy> right
This is still controversial. It's too early for a solid Kwalitee metric. On Tue Apr 30 07:03:24 2013, ETHER wrote: Show quoted text
> > Look for executables in directories that will be installed (in > Makefile.PL, this can be found in the EXE_FILES key), and check their > shebang line - it should not be #!perl or #!/usr/bin/env perl. > > > today's discussion on #plack, which summarizes the issue and gives a > link to current dists that have bad shebang lines: > > 14:42 < frew> miyagawa: so I figured out the starman problem, but > you recently > modified what caused the problem in git, though it > still doesn't > work for me > 14:43 < frew> miyagawa: basically, #!/usr/bin/perl doesn't play > nice with > perlbrew'd perls (obv) > 14:43 < frew> miyagawa: now you have #!perl, which doesn't seem to > work at all > 14:43 < revmischa> i always do /usr/bin/env perl > 14:43 < frew> revmischa: me too > 14:44 < frew> revmischa: that was gonna be my recommendation > 14:44 < frew> except that the recent change to #!perl must mean > something :) > 14:45 * frew sends pull req > 14:46 < ether> #!/usr/bin/perl is rewritten to the installation > perl by EUMM at > 'make install' time > 14:46 < ether> I have no idea of Module::Build does something > similar > 14:47 < frew> well it was always wrong for me :) > 14:47 < doy> installed scripts should never use /usr/bin/env perl > 14:47 * frew reinstalls > 14:48 < doy> the eumm behavior of rewriting the line to point to > the perl that > the script is installed for is the right one > 14:48 < doy> this may be a feature that Module::Build::Tiny > doesn't have yet > (starman isn't using Module::Build) > 14:49 < frew> ok > 14:49 < frew> the latest version works > 14:49 < frew> thanks to MB I guess > 14:49 < frew> thanks doy > 14:52 < doy> ah, yeah, that was just fixed in the latest > Module::Build::Tiny > 14:52 < doy> https://github.com/Leont/module-build-tiny/issues/3 > 14:54 < sri> what a huge fucking mess... > http://grep.cpan.me/?q=%2Fusr%2Fbin%2Fenv+perl > 14:54 < frew> timeout. > 14:55 < sri> (spoiler: it's 1000+ results) > 14:55 < frew> sri: how many for > http://grep.cpan.me/?q=%2Fusr%2Fbin%2Fperl > 14:56 < sri> looks like the server got #plack'd :o > 14:57 < frew> well, I'd MUCH rather usr bin env than just usr bin > perl > 14:57 < frew> the latter is crazy wrong > 14:57 < doy> the former is just as wrong > 14:57 < ether> sounds like there should be a kwalitee rating on > that > 14:57 < sri> it's all wrong \o/ > 14:57 < frew> doy: how so? the former will work so much more > often > 14:57 * ether files a wishlist ticket for that right now;) > 14:58 < doy> it'll still break quite frequently, because it's > still not doing > what you actually want > 14:58 < doy> /usr/bin/env perl is better for scripts that you'll > never install > 14:58 < perigrin> it's picking whatever perl you have in your > environment ... > not the one $script was built against ... no? > 14:58 < doy> but anything that is installed should be pointing at > the perl that > it is installed for > 14:58 < doy> right