Re: Proposed kwalitee metric: installer_not_executable
Hi! On Sat, Mar 18, 2006 at 06:12:37PM +1100, Adam Kennedy wrote: I'd like to propose a Kwalitee test installed_not_executable be added for which you get the Kwalitee point if and only if: 1) Both Makefile.PL and Build.PL (if they exist) are not executable 2) Both Makefile.PL and Build.PL (if they exist) do not have a leading hash-bang line I like it :-) BTW, new and improved CPANTS is nearly finished. And sorry that I wasn't commenting on a few threads lately, but there was a lot of @jobs and $real_live stress which is mostely resolved now. -- #!/usr/bin/perl http://domm.zsi.at for(ref bless{},just'another'perl'hacker){s-:+-$-gprint$_.$/}
Re: Proposed kwalitee metric: installer_not_executable
Moin, On Monday 20 March 2006 09:28, Thomas Klausner wrote: Hi! On Sat, Mar 18, 2006 at 06:12:37PM +1100, Adam Kennedy wrote: I'd like to propose a Kwalitee test installed_not_executable be added for which you get the Kwalitee point if and only if: 1) Both Makefile.PL and Build.PL (if they exist) are not executable 2) Both Makefile.PL and Build.PL (if they exist) do not have a leading hash-bang line I like it :-) Just a clarification: I checked and my Makefile.PL's don't contain a shebang and are not executable anyway, so there is no change and this means, Yay! I am in favour :) BTW, new and improved CPANTS is nearly finished. And sorry that I wasn't commenting on a few threads lately, but there was a lot of @jobs and $real_live stress which is mostely resolved now. Cool! Waiting for it. Best wishes, Tels -- Signed on Mon Mar 20 18:33:37 2006 with key 0x93B84C15. Visit my photo gallery at http://bloodgate.com/photos/ PGP key on http://bloodgate.com/tels.asc or per email. This email violates U.S. patent #4,197,590: for (x = 0; x widht; x++) { for (y = 0; y height; y++) { setPixel (x+xm, y+ym, getPixel(x+xm,y+ym) ^ getCursorPixel(x,y); } } pgpHVPrE8scvm.pgp Description: PGP signature
Re: Proposed kwalitee metric: installer_not_executable
Moin, On Saturday 18 March 2006 08:12, Adam Kennedy wrote: From my understanding, one of the little idiosyncrasies of Makefile.PL/Build.PL installers (including MI variants of both) is that in order to make sure that the Makefile and Build use the correct perl installation, you should always be explicitly running M/B.PL with the perl you want to install the module with, and NOT necesarily with the default perl. This is why installation instructions read perl Makefile.PL make make test make install and not ./Makefile.PL make make test make install For what a tiny fraction of users is there a distinction between these two? And how many users read the insturctions at all, and if, do get the subtle difference or just use ./Makefile.PL anyway? I guess changing Makefile.PL to non-executable will result in a big outcry of all the people who only have one perl installed and find the added hassle annoying. (I always use perl Makefile.PL but this is just a habit, with no thought, I cannot remember having sit at a computer with more than one Perl installed, ever) Best wishes, Tels -- Signed on Sat Mar 18 09:34:39 2006 with key 0x93B84C15. Visit my photo gallery at http://bloodgate.com/photos/ PGP key on http://bloodgate.com/tels.asc or per email. Look, I'm about to buy me a double barreled sawed off shotgun and show Linus what I think about backspace and delete not working. -- some anonymous .signature pgpY2O9Ym68Qc.pgp Description: PGP signature
Re: Proposed kwalitee metric: installer_not_executable
On Saturday 18 March 2006 09:36, Tels wrote: Moin, On Saturday 18 March 2006 08:12, Adam Kennedy wrote: From my understanding, one of the little idiosyncrasies of Makefile.PL/Build.PL installers (including MI variants of both) is that in order to make sure that the Makefile and Build use the correct perl installation, you should always be explicitly running M/B.PL with the perl you want to install the module with, and NOT necesarily with the default perl. This is why installation instructions read perl Makefile.PL make make test make install and not ./Makefile.PL make make test make install In addition, changing the shebang to: #!/usr/bin/env perl should fix the issues, it would use the first perl like perl Makefile.PL will do. Best wishes, Tels -- Signed on Sat Mar 18 09:37:20 2006 with key 0x93B84C15. Visit my photo gallery at http://bloodgate.com/photos/ PGP key on http://bloodgate.com/tels.asc or per email. Like my code? Want to hire me to write some code for you? Send email! pgpEuzba1we0i.pgp Description: PGP signature
Re: Proposed kwalitee metric: installer_not_executable
On 3/18/06, Tels [EMAIL PROTECTED] wrote: Moin, On Saturday 18 March 2006 08:12, Adam Kennedy wrote: From my understanding, one of the little idiosyncrasies of Makefile.PL/Build.PL installers (including MI variants of both) is that in order to make sure that the Makefile and Build use the correct perl installation, you should always be explicitly running M/B.PL with the perl you want to install the module with, and NOT necesarily with the default perl. This is why installation instructions read perl Makefile.PL make make test make install and not ./Makefile.PL make make test make install For what a tiny fraction of users is there a distinction between these two? And how many users read the insturctions at all, and if, do get the subtle difference or just use ./Makefile.PL anyway? Many users have multiple perl installs on their machines. Especially on certain architectures where the manufacturer bundles an old perl on the box. For instance on many of the HPUX boxes i have to use there is perl4, perl5.6 and perl 5.8, and im always having to explain to people about finding the right perl before they start CPAN or whatever. Yves -- perl -Mre=debug -e /just|another|perl|hacker/
Re: Proposed kwalitee metric: installer_not_executable
On Sat, 18 Mar 2006 11:31:05 +0100, demerphq [EMAIL PROTECTED] wrote: On 3/18/06, Tels [EMAIL PROTECTED] wrote: Moin, On Saturday 18 March 2006 08:12, Adam Kennedy wrote: From my understanding, one of the little idiosyncrasies of Makefile.PL/Build.PL installers (including MI variants of both) is that in order to make sure that the Makefile and Build use the correct perl installation, you should always be explicitly running M/B.PL with the perl you want to install the module with, and NOT necesarily with the default perl. This is why installation instructions read perl Makefile.PL make make test make install and not ./Makefile.PL make make test make install For what a tiny fraction of users is there a distinction between these two? And how many users read the insturctions at all, and if, do get the subtle difference or just use ./Makefile.PL anyway? Many users have multiple perl installs on their machines. Especially on certain architectures where the manufacturer bundles an old perl on the box. For instance on many of the HPUX boxes i have to use there is perl4, perl5.6 and perl 5.8, and im always having to explain to people about finding the right perl before they start CPAN or whatever. My thoughts exactly. The avarage number of perl versions installed on a HP-UX machine anywhere in the world is likely to be close to 1.8 For *my* machines it would be closer to 4.5 - perl4 /usr/contrib/bin - perl5.8 /pro/bin (built with HP C-ANSI-C) - perl5.? /usr/local/bin (?) - perl5.8 /opt/perl/bin (built with 32bit GNU gcc) - perl5.8 /opt/perl64/bin (built with 64bit GNU gcc) - perl5.9 /pro/3gl/CPAN/perl-current (devel smokes) - perl5.8 /pro/3gl/CPAN/perl-5.8.x-dor (maint smokes) some systems might have more. HP-UX 10.20 doesn't have the 64bit versions. -- H.Merijn BrandAmsterdam Perl Mongers (http://amsterdam.pm.org/) using porting perl 5.6.2, 5.8.x, 5.9.x on HP-UX 10.20, 11.00, 11.11, 11.23, SuSE 10.0, AIX 4.3 5.2, and Cygwin. http://qa.perl.org http://mirrors.develooper.com/hpux/ http://www.test-smoke.org http://www.goldmark.org/jeff/stupid-disclaimers/
Proposed kwalitee metric: installer_not_executable
From my understanding, one of the little idiosyncrasies of Makefile.PL/Build.PL installers (including MI variants of both) is that in order to make sure that the Makefile and Build use the correct perl installation, you should always be explicitly running M/B.PL with the perl you want to install the module with, and NOT necesarily with the default perl. This is why installation instructions read perl Makefile.PL make make test make install and not ./Makefile.PL make make test make install As a result, to help enforce this and prevent accidental usage of the installer as an executable, it seems to be (at least in the MI case) highly recommended that you M/B.PL file NOT be executable, and NOT contain a #!/usr/bin/perl line at the top. This is specifically the sort of thing that Kwalitee is aimed at, a not-strictly-enforced but almost-always-recommended rule that many people might not be aware of, or might easily get wrong. And it's easy to check with requiring the CPAN metadata or heavy-duty PPI parsing to acomplish. I'd like to propose a Kwalitee test installed_not_executable be added for which you get the Kwalitee point if and only if: 1) Both Makefile.PL and Build.PL (if they exist) are not executable 2) Both Makefile.PL and Build.PL (if they exist) do not have a leading hash-bang line What happens in the case with a pre-rolled Makefile I'm not entirely sure, or other modules that have neither of the files I'm not sure, but such a distribution hasn't strictly speaking made the mistake, so I'm not against given them the point. Comments? Thoughts? Adam K