textproc/p5-Sort-Naturally 1.03_1 FreeBSD
Sort lexically, but sort numeral parts numerically
- System
- FreeBSD
- Repository
- FreeBSD ports
- Maintainer
- [email protected]
- License
- ART10, GPLv1+
- Categories
- textproc, perl5
- Package size
- 14.4 KiB, 33.3 KiB installed
Description
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 lexically.
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 ncmp.
In the other systems
| System | Port | Version |
|---|---|---|
| FreeBSD | textproc/p5-Sort-Naturally | 1.03_1 |
| OpenBSD | devel/p5-Sort-Naturally | 1.03p0 |
| NetBSD | devel/p5-Sort-Naturally | 1.03nb14 |
| DragonFly | textproc/p5-Sort-Naturally | 1.03_1 |
| MidnightBSD | textproc/p5-Sort-Naturally | 1.03_1 |
Install
Binary package:
pkg install p5-Sort-Naturally
From the ports tree:
cd /usr/ports/textproc/p5-Sort-Naturally/ && make install clean
To depend on this port in another port's Makefile:
RUN_DEPENDS= p5-Sort-Naturally>0:textproc/p5-Sort-Naturally
Packages
The version each package repository carries. “-” means the repository builds no package of it, “n/a” that there is no such repository.
| Repository | aarch64 | amd64 | armv6 | armv7 | i386 |
|---|---|---|---|---|---|
| FreeBSD:14:latest | 1.03_1 | 1.03_1 | 1.03_1 | 1.03_1 | 1.03_1 |
| FreeBSD:14:quarterly | 1.03_1 | 1.03_1 | n/a | 1.03_1 | 1.03_1 |
| FreeBSD:15:latest | 1.03_1 | 1.03_1 | n/a | 1.03_1 | 1.03_1 |
| FreeBSD:15:quarterly | 1.03_1 | 1.03_1 | n/a | n/a | n/a |
| FreeBSD:16:latest | 1.03_1 | 1.03_1 | n/a | n/a | n/a |
| FreeBSD:16:quarterly | n/a | n/a | n/a | n/a | n/a |
Dependencies
The Makefile names none itself; they come from USES and USE_*.
The full lists below include those, and their dependencies in turn.
Build dependencies 1
Run dependencies 1
Required by 18
- devel/p5-Data-HexDump-Range
- devel/p5-Data-TreeDumper
- devel/p5-Data-TreeDumper-Renderer-GTK
- devel/p5-Data-Unixish
- devel/p5-Directory-Scratch-Structured
- devel/p5-Eval-Context
- devel/p5-Sort-Sub
- dns/p5-Net-DNS-RR-SRV-Helper
- finance/p5-Finance-QuoteTW
- graphics/asciio
- net/p5-Kafka
- net/p5-Net-Connection-ncnetstat
- net/p5-Net-LDAP-AutoServer
- security/kpcli
- security/p5-App-ClusterSSH
- sysutils/p5-Proc-ProcessTable-ncps
- sysutils/p5-Rex
- www/p5-Data-TreeDumper-Renderer-DHTML
Configuration
No options to configure.
- USES
- perl5
- Service scripts
- none
Files
pkg-plist 2
- %%PERL5_MAN3%%/Sort::Naturally.3.gz
- %%SITE_PERL%%/Sort/Naturally.pm
distinfo 1
| File | Size | SHA256 |
|---|---|---|
| Sort-Naturally-1.03.tar.gz | 11150 | eaab1c5c87575a7826089304ab1f8ffa7f18e6cd8b3937623e998e865ec1e746 |
Master sites 1
- CPAN
Commit history 0
No commits in the history this site was built from.