Skip Menu |

This queue is for tickets about the Sort-External CPAN distribution.

Report information
The Basics
Id: 37623
Status: resolved
Priority: 0/
Queue: Sort-External

People
Owner: Nobody in particular
Requestors: doug [...] parrot-farm.net
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



CC: "Doug Roberts" <doug [...] parrot-farm.net>, "Roberts, Douglas" <droberts [...] rti.org>
Subject: Problem with Sort::External 0.16
Date: Fri, 11 Jul 2008 12:13:20 -0600
To: bug-Sort-External [...] rt.cpan.org
From: "Douglas Roberts" <doug [...] parrot-farm.net>

Message body is not shown because sender requested not to inline it.

Download small-events-unsorted
application/octet-stream 85.6k

Message body not shown because it is not plain text.

Hi, I've downloaded from cpan and installed creamyg's Sort::External module, but it does not seem to be working. Here is the behavior: 1. I created a small unsorted list of data to be sorted. 2. I created my own sort subroutine. 3. Ran the sort with the following settings: my $sortex = Sort::External->new( -mem_threshold => 2**26, -sortsub => $sortscheme, -working_dir => $temp_directory,); and it properly sorted my data. 4. Reran the sort with -mem-threshold set to 2**8, forcing the use of temp files, and the routine went into an endless loop. It seems that as soon as the disk temporary files are used, the sort gets stuck in a loop. FYI, the full test.pl code is attached, as is a small unsorted data file. To run: ./test.pl ./small-events-unsorted test.out Thanks, --Doug Roberts -- Doug Roberts, RTI International droberts@rti.org doug@parrot-farm.net 505-455-7333 - Office 505-670-8195 - Cell
This problem should be resolved in Sort::External 0.17, uploaded to CPAN moments ago. The new version is prepared to handle sortsubs and collections where elements may compare as equal, so the endless loop should never occur. The test supplied along with this bug report completes as it should with 0.17.