Sort::Key::Top::PP - pure Perl implementation of parts of Sort::Key::Top
use Sort::Key::Top::PP 'top'; my @top5 = top 5 => @biglist;
Sort::Key::Top::PP is set of functions for finding the top "n" items in an array by some criteria. It's not as fast as Sort::Key::Top, but it is generally quite a bit faster than sorting the entire array and taking the first "n" items.
This module implements pure Perl equivalents of the following functions as descibed in Sort::Key::Top.
By default all functions are exported. If you don't like that, then please specify an explicit list of functions to import, a la:
use Sort::Key::Top::PP qw( top );
Please report any bugs to http://rt.cpan.org/Dist/Display.html?Queue=Sort-Key-Top-PP.
Toby Inkster <firstname.lastname@example.org>.
Key parts of the top n selection algorithm (and much egging on) by Stanislaw Pusep (cpan:SYP).
API inspired by Sort::Key::Top by Salvador Fandiño García (cpan:SALVA).
This software is copyright (c) 2012, 2014 by Toby Inkster.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.