Lingua::Klingon::Collate version 1.03

Lingua::Klingon::Collate is a module which allows you to sort words in Klingon sort order (for example, 'ngan' should sort after 'nob' since 'ng' comes after 'n' in Klingon sort order and counts as one letter).

You can either transform all words into a representation that allows you to use the normal sort command, or use a subroutine that will transform a word "on the fly".

Generally, if you are sorting many words, it will be quicker to transform each word individually and sort the transformed words. You can either keep a record of which original word matches which transformed word, or untransform the words after sorting.

This module is based on the C library functions strxfrm(3) and strcoll(3). There is no standard C library function strunxfrm(3).

CHANGES SINCE THE LAST VERSION

Update code to support multi-word strings, and added tests for that.

INSTALLATION

To install this module type the following:

perl Build.PL
perl Build
perl Build test
perl Build install

For compatibility, there is also a Makefile.PL provided; this is a wrapper around Build.PL.

DEPENDENCIES

This module requires these other modules and libraries:

Test::More (v0.19 or higher)
Test::Differences
Module::Build

These modules are only required to test and install the module; no further modules are needed at run time.

COPYRIGHT AND LICENCE

Copyright (C) 2003, 2004 by Philip Newton. All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.