develooper Front page | perl.perl5.porters | Postings from July 2009

Re: [PATCH] Add MANIFEST sort test

Thread Previous | Thread Next
Nicholas Clark
July 29, 2009 14:42
Re: [PATCH] Add MANIFEST sort test
Message ID:
On Wed, Jul 29, 2009 at 10:55:36PM +0200, H.Merijn Brand wrote:
> On Wed, 29 Jul 2009 16:48:26 -0400, Jesse Vincent <>
> wrote:
> > On Wed 29.Jul'09 at 22:26:15 +0200, H.Merijn Brand wrote:
> > > On Wed, 29 Jul 2009 13:52:24 -0400, "Jerry D. Hedden"
> > > <> wrote:
> > > 
> > > > The attached patch adds a test to t/lib/manifest.t to check that the
> > > > MANIFEST file is properly sorted.  (And guess what?  It isn't.)
> > > 
> > > Why rely on external sort, where perl has a more reliable sort itself?
> > 
> > Well, we _are_ using the external sort to do the sorting, rather than
> > Perl's built sort.

Well, we don't always. make manisort uses an external sort, but pod/buildtoc
has the sorting algorithm encoded in perl.

I guess it would be best to migrate to using perl sort, and coded in only one
place, for both actions.

> That is what I meant. Why?
> There have been several occasions in the past few month where I fell
> back to perl's sort instead of system sort because - even with a forced
> LC_ALL and LANG - system sort gave me different results on different
> machines where perl's sort works `as expected' (TM)

I was too busy going "ooh shiny" and "why didn't I think of that" to Jerry's
patch to notice exactly how he'd implemented.

As I said, I'm not doing that well at this "thanks applied" stuff.

However, I've refactored t/lib/manifest.t to avoid shelling out, instead
doing the order check as part of the line-by-line loop.

(And hopefully fast enough that Steve Hay's Win32 smoker picks up this version)

Nicholas Clark

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About