NAME
plural form details reference for all included locales
VERSION
Locales.pm v$mod_version (based on CLDR v$cldr_version)
DESCRIPTION
CLDR defines a set of broad plural categories and rules that determine which category any given number will fall under.
Locales allows you to determine the plural categories applicable to a specific locale and also which category a given number will fall under in that locale.
This POD documents which categories and in what order you'd specify them in additional arguments to "get_plural_form()" in Locales (i.e. the optional arguments after the number).
“Special Zero” Argument
In addition to the CLDR category value list you can also specify one additional argument of what to use for zero instead of the value for “other”.
This won't be used if 0 falls under a specific category besides “other”.
Plural Category Argument Order Reference
$pod_items
BUGS AND LIMITATIONS
Please see "BUGS AND LIMITATIONS" in Locales
BEFORE YOU SUBMIT A BUG REPORT
Please see "BEFORE YOU SUBMIT A BUG REPORT" in Locales
AUTHOR
Daniel Muey <http://drmuey.com/cpan_contact.pl>
LICENCE AND COPYRIGHT
Copyright (c) 2009, Daniel Muey <http://drmuey.com/cpan_contact.pl>
. All rights reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.
DISCLAIMER OF WARRANTY
BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
}, 'lib/Locales/DB/Docs/PluralForms.pm', 1, ); }
sub build_manifest { my $base = $manifest; $base =~ s{\.build$}{}; my @in = read_file("$base.in"); my @bl = read_file("$base.build"); write_file( $base, @in, @bl ); }
sub do_changelog { my $changelog = $manifest; $changelog =~ s{MANIFEST\.build$}{Changes}; my @cl = read_file($changelog); return if grep /^$Locales::VERSION\s+/, @cl;
my $time = localtime();
my $new_ent = <<"END_CL";
$Locales::VERSION $time
- Updated data to CLDR $Locales::cldr_version
END_CL write_file( $changelog, $new_ent, @cl ); }
sub _write_utf8_perl { my ( $file, $guts, $mani, $open_plain ) = @_;
my $open = $open_plain ? '>' : '>:utf8'; #:utf8 breaks Native.pm
open( my $fh, $open, $file ) or die "Could not open '$file': $!";
print {$fh} $guts;
close $fh;
system( qw(perltidy -b), $file ) == 0 || die "perltidy failed, '$file' probably has syntax errors";
unlink "$file.bak";
append_file( $manifest, $mani ? "$mani\n" : "lib/Locales/DB/$file\n" );
}
sub _stringify_hash_no_dumper { my $string; for my $k ( keys %{ $_[0] } ) { my $qk = $k; my $qv = $_[0]->{$k}; $qk =~ s{\'}{\\\'}g; $qv =~ s{\'}{\\\'}g; my $ky = $k ne $qk ? qq{"$qk"} : qq{'$k'}; my $vl = $_[0]->{$k} ne $qv ? qq{"$qv"} : qq{'$_[0]->{$k}'}; $string .= "$ky => $vl,\n"; } return $string; }
sub _stringify_hash { my $string = Dumper( $_[0] ); $string =~ s/^\s*\{\s*//; $string =~ s/\s*\}\s*$//; return $string; }
1;