Change 24413 should have updated makedef.pl with the knowledge that 2
[p5sagit/p5-mst-13.2.git] / lib / Unicode / Collate / README
CommitLineData
abd1ec54 1Unicode/Collate version 0.33
45394607 2===============================
3
caffd4cf 4NAME
45394607 5
caffd4cf 6 Unicode::Collate - Unicode Collation Algorithm
45394607 7
8SYNOPSIS
9
10 use Unicode::Collate;
11
12 #construct
5398038e 13 $Collator = Unicode::Collate->new(%tailoring);
45394607 14
15 #sort
5398038e 16 @sorted = $Collator->sort(@not_sorted);
45394607 17
18 #compare
5398038e 19 $result = $Collator->cmp($a, $b); # returns 1, 0, or -1.
20 $result = $Collator->eq($a, $b); # returns true/false
21 (similarly ->ne, ->lt, ->le, ->gt, ->ge)
45394607 22
23INSTALLATION
24
4d36a948 25Perl 5.6.1 or later
10d7ec48 26(recommended: Perl 5.8.0 or later)
27
28To use this module, it is recommended to install a table file
29in the UCA format, by copying it into the directory
30where F<Unicode/Collate.pm> is installed;
31e.g. into F<perl/lib/Unicode/Collate/> directory
32if you have F<perl/lib/Unicode/Collate.pm>.
33
34The most preferable one is "The Default Unicode Collation Element Table",
35available from the Unicode consortium's website:
36
37 http://www.unicode.org/Public/UCA/latest/allkeys.txt (latest version)
38
39Though this distribution contains a subset of allkeys.txt, named "keys.txt",
40this one is intended only for doing a test of this module
41and practically useless for any other purpose.
45394607 42
43To install this module type the following:
44
45 perl Makefile.PL
46 make
47 make test
48 make install
49
abd1ec54 50(!! XSUB for Unicode::Collate is an EXPERIMENTAL support !!)
10d7ec48 51If you have a C compiler and want to use XSUB edition,
52type the following (!! "enableXS" must run before "Makefile.PL" !!):
caffd4cf 53
10d7ec48 54 perl enableXS
55 perl Makefile.PL
56 make
57 make test
58 make install
caffd4cf 59
10d7ec48 60If you decide to install pure Perl (i.e. non-XS) edition after trying
61to build XSUB, type the following:
caffd4cf 62
10d7ec48 63 make clean
64 perl disableXS
65 perl Makefile.PL
66 make
67 make test
68 make install
caffd4cf 69
45394607 70DEPENDENCIES
71
0116f5dc 72 The conformant collation requires Unicode::Normalize (v 0.10 or later)
809c7673 73 although Unicode::Collate can be used without Unicode::Normalize.
45394607 74
75COPYRIGHT AND LICENCE
76
4d36a948 77SADAHIRO Tomoyuki <SADAHIRO@cpan.org>
45394607 78
79 http://homepage1.nifty.com/nomenclator/perl/
80
ae6aa562 81 Copyright(C) 2001-2003, SADAHIRO Tomoyuki. Japan. All rights reserved.
45394607 82
809c7673 83 This library is free software; you can redistribute it
84 and/or modify it under the same terms as Perl itself.
45394607 85