This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
In bodies_by_type in sv.c, no need to store for values for HEs.
[perl5.git] / cpan / Unicode-Collate / README
CommitLineData
456a1446 1Unicode/Collate version 0.56
45394607
JH
2===============================
3
caffd4cf 4NAME
45394607 5
caffd4cf 6 Unicode::Collate - Unicode Collation Algorithm
45394607
JH
7
8SYNOPSIS
9
10 use Unicode::Collate;
11
12 #construct
5398038e 13 $Collator = Unicode::Collate->new(%tailoring);
45394607
JH
14
15 #sort
5398038e 16 @sorted = $Collator->sort(@not_sorted);
45394607
JH
17
18 #compare
5398038e
TS
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
0d50d293 23INSTALL
45394607 24
3756e7ca
RGS
25Perl 5.6.1 or later is required.
26Perl 5.8.1 or later is recommended.
10d7ec48 27
0d50d293
RGS
28Though this module can be used without any C<table> file,
29to use this module easily, it is recommended to install a table file
30in the UCA format, by copying it under the directory
31<a place in @INC>/Unicode/Collate.
3756e7ca
RGS
32
33You can install such a table file by adding it
34to "Collate" directory (where "keys.txt" is placed) in this distribution
35before executing Makefile.PL.
10d7ec48 36
6d24ed10
SP
37The most preferable one is "The Default Unicode Collation Element Table"
38(aka DUCET), available from the Unicode Consortium's website:
3756e7ca 39
0d50d293 40 http://www.unicode.org/Public/UCA/
10d7ec48 41
0d50d293
RGS
42 http://www.unicode.org/Public/UCA/latest/allkeys.txt (latest version)
43
44If DUCET is not installed, it is recommended to copy the file
45from http://www.unicode.org/Public/UCA/latest/allkeys.txt
46to <a place in @INC>/Unicode/Collate/allkeys.txt
47manually.
10d7ec48
NC
48
49Though this distribution contains a subset of allkeys.txt, named "keys.txt",
50this one is intended only for doing a test of this module
51and practically useless for any other purpose.
45394607
JH
52
53To install this module type the following:
54
55 perl Makefile.PL
56 make
57 make test
58 make install
59
abd1ec54 60(!! XSUB for Unicode::Collate is an EXPERIMENTAL support !!)
10d7ec48
NC
61If you have a C compiler and want to use XSUB edition,
62type the following (!! "enableXS" must run before "Makefile.PL" !!):
caffd4cf 63
10d7ec48
NC
64 perl enableXS
65 perl Makefile.PL
66 make
67 make test
68 make install
caffd4cf 69
10d7ec48
NC
70If you decide to install pure Perl (i.e. non-XS) edition after trying
71to build XSUB, type the following:
caffd4cf 72
10d7ec48
NC
73 make clean
74 perl disableXS
75 perl Makefile.PL
76 make
77 make test
78 make install
caffd4cf 79
45394607
JH
80DEPENDENCIES
81
0116f5dc 82 The conformant collation requires Unicode::Normalize (v 0.10 or later)
809c7673 83 although Unicode::Collate can be used without Unicode::Normalize.
45394607 84
0d50d293 85AUTHOR, COPYRIGHT AND LICENSE
45394607 86
0d50d293 87The Unicode::Collate module for perl was written by SADAHIRO Tomoyuki,
74b94a79 88<SADAHIRO@cpan.org>. This module is Copyright(C) 2001-2010,
0d50d293 89SADAHIRO Tomoyuki. Japan. All rights reserved.
45394607 90
3756e7ca
RGS
91This module is free software; you can redistribute it and/or
92modify it under the same terms as Perl itself.
45394607 93
00e00351
CBW
94The file Unicode/Collate/allkeys.txt was copied verbatim
95from http://www.unicode.org/Public/UCA/5.2.0/allkeys.txt
96This file is Copyright (c) 1991-2009 Unicode, Inc. All rights reserved.
0d50d293 97Distributed under the Terms of Use in http://www.unicode.org/copyright.html