diff options
author | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2005-06-24 15:21:38 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2005-06-24 15:21:38 +0000 |
commit | 0d50d293f8dee9da87ffcdd4d56996237ed39b00 (patch) | |
tree | 4eef5e16fb4b2f3ee4c4d360cc4557e8b758c40b /lib | |
parent | 56460430dcb7e8cada68e2a7dcfb1495b75076d1 (diff) | |
download | perl-0d50d293f8dee9da87ffcdd4d56996237ed39b00.tar.gz |
Upgrade to Unicode::Collate 0.51
p4raw-id: //depot/perl@24978
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Unicode/Collate.pm | 55 | ||||
-rw-r--r-- | lib/Unicode/Collate/Changes | 7 | ||||
-rw-r--r-- | lib/Unicode/Collate/README | 34 |
3 files changed, 70 insertions, 26 deletions
diff --git a/lib/Unicode/Collate.pm b/lib/Unicode/Collate.pm index d58fbb5d0e..e6196e0293 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<UCA_Version()> 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<Foo.txt>, the table file is searched as F<Unicode/Collate/Foo.txt> in C<@INC>. By default, F<allkeys.txt> (as the filename of DUCET) is used. +If you will prepare your own table file, any name other than F<allkeys.txt> +may be better to avoid namespace conflict. If C<undef> is passed explicitly as the value for this key, no file is read (but you can define collation elements via C<entry>). @@ -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<table> file, +to use this module easily, it is recommended to install a table file +in the UCA format, by copying it under the directory +<a place in @INC>/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 <a place in @INC>/Unicode/Collate/allkeys.txt +manually. + =head1 CAVEATS =over 4 @@ -1807,14 +1831,19 @@ B<Unicode::Normalize is required to try The Conformance Test.> =back -=head1 AUTHOR +=head1 AUTHOR, COPYRIGHT AND LICENSE -SADAHIRO Tomoyuki <SADAHIRO@cpan.org> +The Unicode::Collate module for perl was written by SADAHIRO Tomoyuki, +<SADAHIRO@cpan.org>. 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 38f0c9a8fe..082f3d54dc 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 db632a2369..05c8f3744f 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<table> file, +to use this module easily, it is recommended to install a table file +in the UCA format, by copying it under the directory +<a place in @INC>/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 <a place in @INC>/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 <SADAHIRO@cpan.org> +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, +<SADAHIRO@cpan.org>. 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 |