Skip Menu |

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

Report information
The Basics
Id: 8247
Status: resolved
Priority: 0/
Queue: Sort-Maker

People
Owner: Nobody in particular
Requestors: rrwo [...] cpan.org
Cc:
AdminCc:

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



Subject: Unable to specify code that is not a regex
I've tried doing this, and it doesn't work. But the documentation seems to imply that only regexes are supported for extraction code, so... If one has an array of objects, it would be nice to say something like code => '$_->method'
there is at least one example that shows extraction code that isn't a regex: # string sort by the 3rd field in the input records (array refs) my $sorter = make_sorter( 'ST', string => '$_->[2]' ) ; can you show a test example where you couldn't use arbitrary code or method calls? uri
in .04 you can now pass a CODE ref as the key extraction code. it is documented and there is an example. .04 will be up on cpan in a few days. uri