From: Rafael Garcia-Suarez Date: Fri, 24 Jun 2005 15:21:38 +0000 (+0000) Subject: Upgrade to Unicode::Collate 0.51 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=0d50d293f8dee9da87ffcdd4d56996237ed39b00;p=p5sagit%2Fp5-mst-13.2.git Upgrade to Unicode::Collate 0.51 p4raw-id: //depot/perl@24978 --- diff --git a/lib/Unicode/Collate.pm b/lib/Unicode/Collate.pm index d58fbb5..e6196e0 100644 --- a/lib/Unicode/Collate.pm +++ b/lib/Unicode/Collate.pm @@ -14,7 +14,7 @@ use File::Spec; no warnings 'utf8'; -our $VERSION = '0.50'; +our $VERSION = '0.51'; our $PACKAGE = __PACKAGE__; my @Path = qw(Unicode Collate); @@ -300,8 +300,10 @@ sub read_table { last if open($fh, $f); $f = undef; } - defined $f - or croak "$PACKAGE: $self->{table} is not found in @INC"; + if (!defined $f) { + $f = File::Spec->catfile(@Path, $self->{table}); + croak("$PACKAGE: Can't locate $f in \@INC (\@INC contains: @INC)"); + } while (<$fh>) { next if /^\s*#/; @@ -1172,11 +1174,12 @@ C should return the latest tracking version supported. The supported tracking version: 8, 9, 11, or 14. - UCA tracking version Unicode version - 8 3.1 - 9 3.1 with Corrigendum 3 - 11 4.0 - 14 4.1.0 + UCA Unicode Standard DUCET (@version) + --------------------------------------------------- + 8 3.1 3.0.1 (3.0.1d9) + 9 3.1 with Corrigendum 3 3.1.1 (3.1.1) + 11 4.0 4.0.0 (4.0.0) + 14 4.1.0 4.1.0 (4.1.0) Note: Recent UTS #10 renames "Tracking Version" to "Revision." @@ -1459,6 +1462,8 @@ on C<@INC>. Say, if the filename is F, the table file is searched as F in C<@INC>. By default, F (as the filename of DUCET) is used. +If you will prepare your own table file, any name other than F +may be better to avoid namespace conflict. If C is passed explicitly as the value for this key, no file is read (but you can define collation elements via C). @@ -1778,6 +1783,25 @@ Returns the version number of UTS #10 this module consults. No method will be exported. +=head1 INSTALL + +Though this module can be used without any C file, +to use this module easily, it is recommended to install a table file +in the UCA format, by copying it under the directory +/Unicode/Collate. + +The most preferable one is "The Default Unicode Collation Element Table", +available from the Unicode Consortium's website: + + http://www.unicode.org/Public/UCA/ + + http://www.unicode.org/Public/UCA/latest/allkeys.txt (latest version) + +If DUCET is not installed, it is recommended to copy the file +from http://www.unicode.org/Public/UCA/latest/allkeys.txt +to /Unicode/Collate/allkeys.txt +manually. + =head1 CAVEATS =over 4 @@ -1807,14 +1831,19 @@ B =back -=head1 AUTHOR +=head1 AUTHOR, COPYRIGHT AND LICENSE -SADAHIRO Tomoyuki +The Unicode::Collate module for perl was written by SADAHIRO Tomoyuki, +. This module is Copyright(C) 2001-2005, +SADAHIRO Tomoyuki. Japan. All rights reserved. -Copyright(C) 2001-2005, SADAHIRO Tomoyuki. Japan. All rights reserved. +This module is free software; you can redistribute it and/or +modify it under the same terms as Perl itself. -This module is free software; you can redistribute it -and/or modify it under the same terms as Perl itself. +The file Unicode/Collate/allkeys.txt was copied directly +from http://www.unicode.org/Public/UCA/4.1.0/allkeys.txt (aka DUCET). +This file is Copyright (c) 1991-2005 Unicode, Inc. All rights reserved. +Distributed under the Terms of Use in http://www.unicode.org/copyright.html =head1 SEE ALSO diff --git a/lib/Unicode/Collate/Changes b/lib/Unicode/Collate/Changes index 38f0c9a..082f3d5 100644 --- a/lib/Unicode/Collate/Changes +++ b/lib/Unicode/Collate/Changes @@ -1,5 +1,12 @@ Revision history for Perl module Unicode::Collate. +0.51 Sun May 29 20:21:19 2005 + - Added the latest DUCET (for Unicode 4.1.0) as Collate/allkeys.txt, + which is not required to test this module. + Please notice that allkeys.txt will be overwritten if you have had + other allkeys.txt already. + - Added INSTALL section in POD. + 0.50 Sun May 8 20:26:39 2005 - Now UCA Revision 14 (based on Unicode 4.1.0). - Some tests are modified. diff --git a/lib/Unicode/Collate/README b/lib/Unicode/Collate/README index db632a2..05c8f37 100644 --- a/lib/Unicode/Collate/README +++ b/lib/Unicode/Collate/README @@ -1,4 +1,4 @@ -Unicode/Collate version 0.50 +Unicode/Collate version 0.51 =============================== NAME @@ -20,16 +20,15 @@ SYNOPSIS $result = $Collator->eq($a, $b); # returns true/false (similarly ->ne, ->lt, ->le, ->gt, ->ge) -INSTALLATION +INSTALL Perl 5.6.1 or later is required. Perl 5.8.1 or later is recommended. -To use this module, it is recommended to install a table file -in the UCA format, by copying it into the directory -where Unicode/Collate.pm is installed; -e.g., into perl/lib/Unicode/Collate/ directory -if you will have perl/lib/Unicode/Collate.pm. +Though this module can be used without any C
file, +to use this module easily, it is recommended to install a table file +in the UCA format, by copying it under the directory +/Unicode/Collate. You can install such a table file by adding it to "Collate" directory (where "keys.txt" is placed) in this distribution @@ -38,9 +37,14 @@ before executing Makefile.PL. The most preferable one is "The Default Unicode Collation Element Table", available from the Unicode Consortium's website: - http://www.unicode.org/Public/UCA/ + http://www.unicode.org/Public/UCA/ - http://www.unicode.org/Public/UCA/latest/allkeys.txt (latest version) + http://www.unicode.org/Public/UCA/latest/allkeys.txt (latest version) + +If DUCET is not installed, it is recommended to copy the file +from http://www.unicode.org/Public/UCA/latest/allkeys.txt +to /Unicode/Collate/allkeys.txt +manually. Though this distribution contains a subset of allkeys.txt, named "keys.txt", this one is intended only for doing a test of this module @@ -78,12 +82,16 @@ DEPENDENCIES The conformant collation requires Unicode::Normalize (v 0.10 or later) although Unicode::Collate can be used without Unicode::Normalize. -COPYRIGHT AND LICENSE - -SADAHIRO Tomoyuki +AUTHOR, COPYRIGHT AND LICENSE -Copyright(C) 2001-2005, SADAHIRO Tomoyuki. Japan. All rights reserved. +The Unicode::Collate module for perl was written by SADAHIRO Tomoyuki, +. This module is Copyright(C) 2001-2005, +SADAHIRO Tomoyuki. Japan. All rights reserved. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. +The file Unicode/Collate/allkeys.txt was copied directly +from http://www.unicode.org/Public/UCA/4.1.0/allkeys.txt (aka DUCET). +This file is Copyright (c) 1991-2005 Unicode, Inc. All rights reserved. +Distributed under the Terms of Use in http://www.unicode.org/copyright.html