develooper Front page | perl.perl5.porters | Postings from October 2012

[PATCH at v5.17.5-38] improve the make_ext.pl file a bit

Thread Next
From:
vadim.konovalov
Date:
October 24, 2012 12:47
Subject:
[PATCH at v5.17.5-38] improve the make_ext.pl file a bit
Message ID:
35BF8D9716175C43BB9D67CA60CC345E028EE0CE03@FRMRSSXCHMBSC2.dc-m.alcatel-lucent.com
Hi,

In the process of removing bitrot from wince crosscompile, I've
realised that I do not understand, at what moment files from ./cpan 
and ./dist directories get copied into ./lib

so I will be grateful for anyone's pointers into this. TIA.

Meanwhile, attached is the patch to improve the "make_ext.pl" file a bit.

First, a single line 
	    my $suffix = '.sh';
looks like it is having self-documentation purpose, but it actually works
in opposite direction IMO - I spent more time seeking wheter this variable
used several times and whether it is changed afterwards and then realised
that it isn't.
So I propose removing it.

Next, and more important one - cleaner and shorter way of rearranging of
the @extspec, which looks quite straightforward, fewer lines, thus - easier to 
comprehend.

it is based on quite simple idea:

D:\>perl -we "print sort {$b eq 'f' || $b eq 'n' || $a cmp $b} 'a'..'z'"
nfabcdeghijklmopqrstuvwxyz

BTW there is another short way on solving the task, but I'm not really
in golfing mode, due to weather conditions here in Russia :)

Thanks in advance for looking into this,
(I've verified that build chain isn't broken with the change...)

regards,
Vadim.
Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About