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

Re: [perl #126271] File::Glob issue

Thread Previous | Thread Next
From:
Craig A. Berry
Date:
October 13, 2015 18:22
Subject:
Re: [perl #126271] File::Glob issue
Message ID:
CA+vYcVwDhQr+ZWEQLqCmnv7OKGyyyxPLUYo8v90xd46s+tnTCA@mail.gmail.com
On Tue, Oct 6, 2015 at 11:01 AM, Karl Williamson
<public@khwilliamson.com> wrote:

> It is my supposition that the core converting to use File::Glob was for
> performance reasons.  (Perhaps it was to also get more uniform handling
> across platforms.)  Since it's undocumented, perhaps someone could enlighten
> me.

I have some memory of being told it was about "eating our own dog
food," i.e., it's doing something Perl should be good at, so let's use
Perl to do it.  It initially caused various bootstrapping problems and
always seemed like something of a layer violation to me.  That could
be dealt with by bringing the relevant bits deeper into core as
described elsewhere in this thread by Zefram.

Commit 52bb0670c0d245e31203 doesn't say much except in its perldelta
addition mentions, "avoids using an external csh process and the
problems associated with it."  There was likely some discussion of
what those problems are on-list, but I couldn't find anything relevant
quickly.

> One solution I thought of (that Zefram) doesn't like is for F:G to fork
> a shell if and only if it finds a shell metacharacter. That way the
> performance wouldn't suffer except in edge cases.

Do all shells have the same metacharacters?  What if the CLI from
which Perl was invoked was not a Unix shell at all?

Thread Previous | 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