Commit | Line | Data |
---|---|---|
f768f60b | 1 | =pod |
6b14ceb7 JH |
2 | |
3 | =head1 NAME | |
4 | ||
afac733b | 5 | Locale::Country - module for dealing with country code sets |
6b14ceb7 JH |
6 | |
7 | =head1 SYNOPSIS | |
8 | ||
f768f60b | 9 | use Locale::Country; |
6b14ceb7 | 10 | |
afac733b SB |
11 | $name = code2country(CODE); |
12 | $code = country2code(NAME); | |
6b14ceb7 | 13 | |
afac733b | 14 | @codes = all_country_codes(); |
f768f60b | 15 | @names = all_country_names(); |
6b14ceb7 | 16 | |
f768f60b | 17 | =head1 DESCRIPTION |
6b14ceb7 | 18 | |
afac733b | 19 | This module provides access to country code sets. |
6b14ceb7 | 20 | |
afac733b SB |
21 | Please refer to the L<Locale::Codes::Types> document for a description |
22 | of the code sets available. | |
6b14ceb7 | 23 | |
afac733b SB |
24 | Most of the routines take an optional additional argument which |
25 | specifies the code set to use. The code set can be specified using the | |
26 | name of a code set, or the perl constant specified in the above | |
27 | document. If not specified, the default code set will be used. | |
4345d05b | 28 | |
afac733b | 29 | =head1 ROUTINES |
4345d05b | 30 | |
afac733b SB |
31 | All routines in this module call the appropriate method in the |
32 | L<Locale::Codes> module, using an object of type: country | |
33 | Please refer to the documentation of the L<Locale::Codes> module | |
34 | for details about each function. | |
4345d05b | 35 | |
afac733b | 36 | The following functions are exported automatically: |
6b14ceb7 | 37 | |
f768f60b | 38 | =over 4 |
6b14ceb7 | 39 | |
afac733b | 40 | =item B<code2country(CODE [,CODESET] [,'retired'])> |
6b14ceb7 | 41 | |
afac733b | 42 | See B<code2name> in L<Locale::Codes> |
6b14ceb7 | 43 | |
afac733b | 44 | =item B<country2code(NAME [,CODESET] [,'retired'])> |
6b14ceb7 | 45 | |
afac733b | 46 | See B<name2code> in L<Locale::Codes> |
756a1fc4 | 47 | |
afac733b | 48 | =item B<country_code2code(CODE ,CODESET ,CODESET2)> |
756a1fc4 | 49 | |
afac733b | 50 | See B<code2code> in L<Locale::Codes> |
756a1fc4 | 51 | |
afac733b | 52 | =item B<all_country_codes([CODESET] [,'retired'])> |
756a1fc4 | 53 | |
afac733b | 54 | See B<all_codes> in L<Locale::Codes> |
756a1fc4 | 55 | |
afac733b | 56 | =item B<all_country_names([CODESET] [,'retired'])> |
756a1fc4 | 57 | |
afac733b | 58 | See B<all_names> in L<Locale::Codes> |
756a1fc4 | 59 | |
6b14ceb7 JH |
60 | =back |
61 | ||
afac733b SB |
62 | The following functions are not exported and must be called fully |
63 | qualified with the package name: | |
6b14ceb7 JH |
64 | |
65 | =over 4 | |
66 | ||
72807c72 CBW |
67 | =item B<Locale::Country::show_errors(FLAG)> |
68 | ||
69 | By default, invalid input will produce empty results, but no errors. By | |
70 | passing in a non-zero value of FLAG, errors will be produced. | |
71 | ||
72 | See B<show_errors> in L<Locale::Codes> but note that the default for | |
73 | the non-OO modules are to NOT produce errors. | |
74 | ||
68bfa5ea | 75 | =item B<Locale::Country::rename_country(CODE ,NEW_NAME [,CODESET])> |
917211f5 | 76 | |
afac733b SB |
77 | See B<rename_code> in L<Locale::Codes> |
78 | ||
68bfa5ea | 79 | =item B<Locale::Country::add_country(CODE ,NAME [,CODESET])> |
6b14ceb7 | 80 | |
afac733b SB |
81 | See B<add_code> in L<Locale::Codes> |
82 | ||
68bfa5ea | 83 | =item B<Locale::Country::delete_country(CODE [,CODESET])> |
6b14ceb7 | 84 | |
afac733b SB |
85 | See B<delete_code> in L<Locale::Codes> |
86 | ||
68bfa5ea | 87 | =item B<Locale::Country::add_country_alias(NAME ,NEW_NAME)> |
6b14ceb7 | 88 | |
afac733b SB |
89 | See B<add_alias> in L<Locale::Codes> |
90 | ||
68bfa5ea | 91 | =item B<Locale::Country::delete_country_alias(NAME)> |
6b14ceb7 | 92 | |
afac733b SB |
93 | See B<delete_alias> in L<Locale::Codes> |
94 | ||
68bfa5ea | 95 | =item B<Locale::Country::rename_country_code(CODE ,NEW_CODE [,CODESET])> |
6b14ceb7 | 96 | |
afac733b SB |
97 | See B<replace_code> in L<Locale::Codes> |
98 | ||
68bfa5ea | 99 | =item B<Locale::Country::add_country_code_alias(CODE ,NEW_CODE [,CODESET])> |
917211f5 | 100 | |
afac733b SB |
101 | See B<add_code_alias> in L<Locale::Codes> |
102 | ||
68bfa5ea | 103 | =item B<Locale::Country::delete_country_code_alias(CODE [,CODESET])> |
917211f5 | 104 | |
afac733b | 105 | See B<delete_code_alias> in L<Locale::Codes> |
917211f5 | 106 | |
f768f60b | 107 | =back |
6b14ceb7 | 108 | |
f768f60b | 109 | =head1 SEE ALSO |
6b14ceb7 JH |
110 | |
111 | =over 4 | |
112 | ||
68bfa5ea | 113 | =item L<Locale::Codes> |
6b14ceb7 | 114 | |
e1137bc7 SB |
115 | The Locale-Codes distribution. |
116 | ||
6b14ceb7 JH |
117 | =back |
118 | ||
6b14ceb7 JH |
119 | =head1 AUTHOR |
120 | ||
f768f60b | 121 | See Locale::Codes for full author history. |
6b14ceb7 | 122 | |
f768f60b | 123 | Currently maintained by Sullivan Beck (sbeck@cpan.org). |
6b14ceb7 | 124 | |
f768f60b | 125 | =head1 COPYRIGHT |
6b14ceb7 | 126 | |
afac733b | 127 | Copyright (c) 2011-2017 Sullivan Beck |
6b14ceb7 JH |
128 | |
129 | This module is free software; you can redistribute it and/or | |
130 | modify it under the same terms as Perl itself. | |
131 | ||
132 | =cut |