develooper Front page | perl.perl5.porters | Postings from April 2013

RE: [PATCH] On eliminating external tools from the release process

Thread Previous | Thread Next
bulk 88
April 4, 2013 08:09
RE: [PATCH] On eliminating external tools from the release process
Message ID:

> Date: Wed, 3 Apr 2013 22:12:54 +0200
> From:
> To:
> Subject: [PATCH] On eliminating external tools from the release process
> Hi p5p,
> several of our tools for the release process rely on Unix shell tools 
> being available. This somewhat hampers the ability to do a release using 
> only Windows or other OSes where the "unix centric" toolset is 
> unavailable, but keeps the scripts themselves fairly simple.
> During my release of 5.17.10, I patched away some of the external tools 
> of Porting/sync-with-cpan, so it mostly works under Windows, and without 
> reliance on the external programs. The patches are attached below, and 
> separated thematically but please do not immediately apply them.
> I found two general steps for eliminating external tools:
> 1) Perl already comes with ExtUtils::Command, which is a good 
> replacement for many common shell commands. I assume that most of 
> ExtUtils::Command was even written to replace common shell commands. The 
> first patch changes many calls to these external tools to external calls 
> to ExtUtils::Command. Supposedly, I could instead appropriate (code 
> from) Shell::Command to remove the reliance on an external (Perl) 
> process, but in my limited testing, this didn't always work.

Is ExtUtils::Command a suitable replacement for natively calling the shell, 
performance wise?  I looked at ExtUtils::Command's cp/copy, and from a 
superficial glance, it never calls the shell copy even if the shell has a 
usuable copy command. On Win32 it tries dynaload Win32::, if it
 can't it reverts to a for loop to do the copying in pure perl. 
VMS also has a C implementation, on  POSIX 
it seems to do a for loop with buffers. On some OSes a "native 
copy" can be transactional or async, and it returns almost immediately. 
On other OSes, prefetching or hinting to the IO scheduler that we are 
doing sequential reading will serialize and buffer instead of interleave the 
reads. On others OSes, zero copy DMA to DMA copying is done with
 kernel help. A for loop through stdio does none of that.
Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About