dist/Filter-Simple/t/lib/Filter/Simple/FilterOnlyTest.pm Helper file for Filter::Simple tests
dist/Filter-Simple/t/lib/Filter/Simple/FilterTest.pm Helper file for Filter::Simple tests
dist/Filter-Simple/t/lib/Filter/Simple/ImportTest.pm Helper file for Filter::Simple tests
+dist/I18N-Collate/lib/I18N/Collate.pm Routines to do strxfrm-based collation
+dist/I18N-Collate/t/I18N-Collate.t See if I18N::Collate works
dist/I18N-LangTags/ChangeLog I18N::LangTags
dist/I18N-LangTags/lib/I18N/LangTags/Detect.pm Detect language preferences
dist/I18N-LangTags/lib/I18N/LangTags/List.pm List of tags for human languages
lib/h2ph.t See if h2ph works like it should
lib/h2xs.t See if h2xs produces expected lists of files
lib/hostname.pl Old hostname code
-lib/I18N/Collate.pm Routines to do strxfrm-based collation
-lib/I18N/Collate.t See if I18N::Collate works
lib/importenv.pl Perl routine to get environment into variables
lib/integer.pm For "use integer"
lib/integer.t For "use integer" testing
'UPSTREAM' => 'cpan',
},
+ 'I18N::Collate' =>
+ {
+ 'MAINTAINER' => 'p5p',
+ 'DISTRIBUTION' => 'FLORA/I18N-Collate-1.01.tar.gz',
+ 'FILES' => q[dist/I18N-Collate],
+ 'UPSTREAM' => 'blead',
+ },
+
# Sean has donated it to us.
# Nothing has changed since his last CPAN release.
# (not strictly true: there have been some trivial typo fixes; DAPM 6/2009)
lib/FileHandle.{pm,t}
lib/FindBin.{pm,t}
lib/Getopt/Std.{pm,t}
- lib/I18N/Collate.{pm,t}
lib/Internals.t
lib/Module/Build/ConfigData.pm
lib/Net/hostent.{pm,t}
=head1 SYNOPSIS
use I18N::Collate;
- setlocale(LC_COLLATE, 'locale-of-your-choice');
+ setlocale(LC_COLLATE, 'locale-of-your-choice');
$s1 = I18N::Collate->new("scalar_data_1");
$s2 = I18N::Collate->new("scalar_data_2");
***
-This module provides you with objects that will collate
-according to your national character set, provided that the
+This module provides you with objects that will collate
+according to your national character set, provided that the
POSIX setlocale() function is supported on your system.
You can compare $s1 and $s2 above with
# setlocale(LC_COLLATE, 'locale-of-your-choice'); # 4)
# $s1 = I18N::Collate->("scalar_data_1");
# $s2 = I18N::Collate->("scalar_data_2");
-#
+#
# now you can compare $s1 and $s2: $s1 le $s2
# to extract the data itself, you need to deref: $$s1
-#
-# Notes:
+#
+# Notes:
# 1) this uses POSIX::setlocale
# 2) the basic collation conversion is done by strxfrm() which
# terminates at NUL characters being a decent C routine.
my ($category, $locale) = @_[0,1];
POSIX::setlocale($category, $locale) if (defined $category);
- # the current $LOCALE
+ # the current $LOCALE
$LOCALE = $locale || $ENV{'LC_COLLATE'} || $ENV{'LC_ALL'} || '';
}
sub collate_xfrm {
my $s = $_[0];
my $x = '';
-
+
for (split(/(\000+)/, $s)) {
$x .= (/^\000/) ? $_ : strxfrm("$_\000");
}
#!./perl
+# at least in the CPAN version we're sometimes called with -w, for example
+# during 'make test', so disable them explicitly and only turn them on again for
+# the deprecation test.
+no warnings;
+
BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
require Config; import Config;
if (!$Config{d_setlocale} || $Config{ccflags} =~ /\bD?NO_LOCALE\b/) {
print "1..0\n";
print "not " if $a lt $b == $a gt $b;
print "ok 7\n";
-
/Filter/Util
/GDBM_File.pm
/Hash
+/I18N/Collate.pm
/I18N/LangTags
/I18N/LangTags.pm
/I18N/Langinfo.pm