p5-Sort-Naturally - Sort lexically, but sort numeral parts numerically

Property Value
Distribution FreeBSD 11
Repository FreeBSD Ports Latest amd64
Package filename p5-Sort-Naturally-1.03_1.txz
Package name p5-Sort-Naturally
Package version 1.03
Package release 1
Package architecture amd64
Package type txz
Category perl5 textproc
Homepage https://metacpan.org/release/Sort-Naturally
License GPLv1+, ART10
Maintainer culot@FreeBSD.org
Download size 13.93 KB
Installed size 33.54 KB
This module exports two functions, nsort and ncmp; they are used in implementing
my idea of a "natural sorting" algorithm. Under natural sorting, numeric
substrings are compared numerically, and other word-characters are compared
This is the way I define natural sorting:
* Non-numeric word-character substrings are sorted lexically,
case-insensitively: "Foo" comes between "fish" and "fowl".
* Numeric substrings are sorted numerically: "100" comes after "20",
not before.
* \W substrings (neither words-characters nor digits) are ignored.  Our use
* of \w, \d, \D, and \W is locale-sensitive: Sort::Naturally
uses a use locale statement.
* When comparing two strings, where a numeric substring in one place
is not up against a numeric substring in another, the non-numeric always comes
first. This is fudged by reading pretending that the lack of a number substring
has the value -1, like so:
* The start of a string is exceptional: leading non-\W (non-word,
non-digit) components are ignored, and numbers come before letters.
* I define "numeric substring" just as sequences matching m/\d+/ --
scientific notation, commas, decimals, etc., are not seen. If your data has
thousands separators in numbers ("20,000 Leagues Under The Sea" or "20.000
lieues sous les mers"), consider stripping them before feeding them to nsort or
WWW: https://metacpan.org/release/Sort-Naturally


Package Version Architecture Repository
p5-Sort-Naturally-1.03_1.txz 1.03 i386 FreeBSD Ports Quarterly
p5-Sort-Naturally-1.03_1.txz 1.03 amd64 FreeBSD Ports Quarterly
p5-Sort-Naturally-1.03_1.txz 1.03 i386 FreeBSD Ports Latest
p5-Sort-Naturally - - -


Name Value
perl5 = 5.28.1_1


Type URL
Mirror pkg.freebsd.org
Binary Package p5-Sort-Naturally-1.03_1.txz
Source Package textproc/p5-Sort-Naturally

Install Howto

Install p5-Sort-Naturally txz package:

# pkg install p5-Sort-Naturally

See Also

Package Description
p5-Sort-Tree-1.09_1.txz Perl module for sorting a objects into a tree structure
p5-Sort-Versions-1.62.txz Perl 5 module for sorting of revision-like numbers
p5-Specio-0.44.txz Type constraints and coercions for Perl
p5-Sphinx-Config-0.10.txz Sphinx search engine configuration file read/modify/write
p5-Sphinx-Manager-0.08.txz Sphinx search engine management (start/stop)
p5-Sphinx-Search-0.31.txz Sphinx search engine API Perl client
p5-Spiffy-0.46_1.txz Spiffy Perl Interface Framework For You
p5-Spoon-0.24_2.txz Spiffy Application Building Framework
p5-Spreadsheet-GenerateXLSX-0.04.txz Generate XLSX spreadsheet from array ref(s)
p5-Spreadsheet-ParseExcel-0.65_2,1.txz Get information from Excel file
p5-Spreadsheet-ParseXLSX-0.27.txz Spreadsheet::ParseXLSX - parse XLSX files
p5-Spreadsheet-Read-0.81.txz Read the data from a spreadsheet
p5-Spreadsheet-ReadSXC-0.20_1.txz Extract OpenOffice 1.x spreadsheet data
p5-Spreadsheet-WriteExcel-2.40_1.txz Write to a cross-platform Excel binary file
p5-Spreadsheet-WriteExcel-FromXML-1.1_1,1.txz Create an Excel Spreadsheet from XML