must exists in the code set specified by B and must have a corresponding code in the code set specified by B or C will be returned. $obj->code2code('fin','alpha-3','alpha-2'); => 'fi' Note that this function does NOT support retired codes. =item B @code = $obj->all_codes([$codeset] [,'retired']); This returns a list of all code in the code set. The codes will be sorted. By default, only active codes will be returned, but if the string 'retired' is passed in as an argument, both active and retired codes will be returned. =item B @name = $obj->all_names([$codeset] [,'retired']); This method returns a list of all elements names for which there is a corresponding code in the specified code set. The names returned are exactly as they are specified in the standard, and are sorted. Since not all elements are listed in all code sets, the list of elements may differ depending on the code set specified. By default, only active names will be returned, but if the string 'retired' is passed in as an argument, both active and retired names will be returned. =back The following additional methods are available and can be used to modify the code list data (and are therefore not generally useful). =over 4 =item B $flag = $obj->rename_code($code,$new_name [,$codeset]); This method can be used to change the official name of an element. At that point, the name returned by the C method would be B instead of the name specified in the standard. The original name will remain as an alias. For example, the official country name for code 'gb' is 'United Kingdom'. If you want to change that, you might call: $obj->rename_code('gb', 'Great Britain'); This means that calling code2name('gb') will now return 'Great Britain' instead of 'United Kingdom'. If any error occurs, a warning is issued and 0 is returned. An error occurs if B doesn't exist in the specified code set, or if B is already in use but for a different element. If the method succeeds, 1 is returned. =item B $flag = $obj->add_code($code,$name [,$codeset]); This method is used to add a new code and name to the data. Both B and B must be unused in the data set or an error occurs (though B may be used in a different data set). For example, to create the fictitious country named "Duchy of Grand Fenwick" with codes "gf" and "fen", use the following: $obj->add_code("fe","Duchy of Grand Fenwick",'alpha-2'); $obj->add_code("fen","Duchy of Grand Fenwick",'alpha-3'); The return value is 1 on success, 0 on an error. =item B $flag = $obj->delete_code($code [,$codeset]); This method is used to delete a code from the data. B must refer to an existing code in the code set. The return value is 1 on success, 0 on an error. =item B $flag = $obj->add_alias($name,$new_name); This method is used to add a new alias to the data. They do not alter the return value of the C function. B must be an existing element name, and B must be unused or an error occurs. The return value is 1 on success, 0 on an error. =item B $flag = $obj->delete_alias($name); This method is used to delete an alias from the data. Once removed, the element may not be referred to by B. B must be one of a list of at least two names that may be used to specify an element. If the element may only be referred to by a single name, you'll need to use the C method to add a new alias first, or the C method to remove the element entirely. If the alias is used as the name in any code set, one of the other names will be used instead. Predicting exactly which one will be used requires you to know the order in which the standards were read, which is not reliable, so you may want to use the C method to force one of the alternate names to be used. The return value is 1 on success, 0 on an error. =item B $flag = $obj->replace_code($code,$new_code [,$codeset]); This method is used to change the official code for an element. At that point, the code returned by the C method would be B instead of the code specified in the standard. B may either be a code that is not in use, or it may be an alias for B (in which case, B becomes and alias and B becomes the "real" code). The original code is kept as an alias, so that the C routines will work with either the code from the standard or the new code. However, the C method will only return the codes which are considered "real" (which means that the list of codes will now contain B, but will not contain B). =item B $flag = $obj->add_code_alias($code,$new_code [,$codeset]); This method adds an alias for the code. At that point, B and B will both work in the C method. However, the C method will still return the original code. =item B These routines delete an alias for the code. These will only work if B is actually an alias. If it is the "real" code, it will not be deleted. You will need to use the C method to switch the real code with one of the aliases, and then delete the alias. =back =head1 TRADITIONAL INTERFACES In addition the the primary OO module, the following modules are included in the distribution for the traditional way of working with code sets. Each module will work with one specific type of code sets. =over 4 =item L, L This includes support for country codes (such as those listed in ISO-3166) to specify the country. Because this module was originally distributed as L, it is also available under that name. =item L, L This includes support for language codes (such as those listed in ISO-639) to specify the language. Because this module was originally distributed as L, it is also available under that name. =item L, L This includes support for currency codes (such as those listed in ISO-4217) to specify the currency. Because this module was originally distributed as L, it is also available under that name. =item L, L This includes support for script codes (such as those listed in ISO-15924) to specify the script. Because this module was originally distributed as L, it is also available under that name. =item L This includes support for language extension codes (such as those listed in the IANA language registry) to specify the language extension. =item L This includes support for language variation codes (such as those listed in the IANA language registry) to specify the language variation. =item L This includes support for language family codes (such as those listed in ISO 639-5) to specify families of languages. =back In addition to the modules above, there are a number of support modules included in the distribution. Any module not listed above falls into that category. These modules are not intended to be used by programmers. They contain functions or data that are used by the modules listed above. No support of any kind is offered for using these modules directly. They may be modified at any time. =head1 COMMON ALIASES As of version 2.00, the modules supported common variants of names. For example, Locale::Country supports variant names for countries, and a few of the most common ones are included in the data. The country code for "United States" is "us", so: country2code('United States'); => "us" Now the following will also return 'us': country2code('United States of America'); country2code('USA'); Any number of common aliases may be included in the data, in addition to the names that come directly from the standards. If you have a common alias for a country, language, or any other of the types of codes, let me know and I'll add it, with some restrictions. For example, the country name "North Korea" never appeared in any of the official sources (instead, it was "Korea, North" or "Korea, Democratic People's Republic of". I would honor a request to add an alias "North Korea" since that's a very common way to specify the country (please don't request this... I've already added it). On the other hand, a request to add Zaire as an alias for "Congo, The Democratic Republic of" will not be honored. The country's official name is no longer Zaire, so adding it as an alias violates the standard. Zaire was kept as an alias in versions of this module prior to 3.00, but it has been removed. Other aliases (if any) which no longer appear in any standard (and which are not common variations of the name in the standards) have also been removed. =head1 RETIRED CODES Occasionally, a code is deprecated, but it may still be desirable to have access to it. Although there is no way to see every code that has ever existed and been deprecated (since most codesets do not have that information available), as of version 3.20, every code which has ever been included in these modules can be referenced. For more information, refer to the documentation on the code2name, name2code, all_codes, and all_names methods above. =head1 SEE ALSO =over 4 =item L The list of all code sets available for each type. =item L A history of changes made to this distribution. =back =head1 KNOWN BUGS AND LIMITATIONS =over 4 =item B Because each code set uses a slightly different list of elements, and they are not necessarily one-to-one, there may be some confusion about the relationship between codes from different code sets. For example, ISO 3166 assigns one code to the country "United States Minor Outlying Islands", but the IANA codes give different codes to different islands (Baker Island, Howland Island, etc.). This may cause some confusion... I've done the best that I could do to minimize it. =item B Currently all names must be all ASCII. I plan on relaxing that limitation in the future. =back =head1 BUGS AND QUESTIONS If you find a bug in Locale::Codes, there are three ways to send it to me. Any of them are fine, so use the method that is easiest for you. =over 4 =item Direct email You are welcome to send it directly to me by email. The email address to use is: sbeck@cpan.org. =item CPAN Bug Tracking You can submit it using the CPAN tracking too. This can be done at the following URL: L =item GitHub You can submit it as an issue on GitHub. This can be done at the following URL: L =back Please do not use other means to report bugs (such as forums for a specific OS or Linux distribution) as it is impossible for me to keep up with all of them. When filing a bug report, please include the following information: =over 4 =item B Please include the version of Locale::Codes you are using. You can get this by using the script: use Locale::Codes; print $Locale::Codes::VERSION,"\n"; =back If you want to report missing or incorrect codes, you must be running the most recent version of Locale::Codes. If you find any problems with the documentation (errors, typos, or items that are not clear), please send them to me. I welcome any suggestions that will allow me to improve the documentation. =head1 AUTHOR Locale::Country and Locale::Language were originally written by Neil Bowers at the Canon Research Centre Europe (CRE). They maintained the distribution from 1997 to 2001. Locale::Currency was originally written by Michael Hennecke and was modified by Neil Bowers for inclusion in the distribution. From 2001 to 2004, maintenance was continued by Neil Bowers. He modified Locale::Currency for inclusion in the distribution. He also added Locale::Script. From 2004-2009, the module was unmaintained. In 2010, maintenance was taken over by Sullivan Beck (sbeck@cpan.org) with Neil Bower's permission. All problems or comments should be sent to him using any of the methods listed above. =head1 COPYRIGHT Copyright (c) 1997-2001 Canon Research Centre Europe (CRE). Copyright (c) 2001 Michael Hennecke (Locale::Currency) Copyright (c) 2001-2010 Neil Bowers Copyright (c) 2010-2018 Sullivan Beck This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut
doesn't exist in the specified code set, or if B is already in use but for a different element. If the method succeeds, 1 is returned. =item B $flag = $obj->add_code($code,$name [,$codeset]); This method is used to add a new code and name to the data. Both B and B must be unused in the data set or an error occurs (though B may be used in a different data set). For example, to create the fictitious country named "Duchy of Grand Fenwick" with codes "gf" and "fen", use the following: $obj->add_code("fe","Duchy of Grand Fenwick",'alpha-2'); $obj->add_code("fen","Duchy of Grand Fenwick",'alpha-3'); The return value is 1 on success, 0 on an error. =item B $flag = $obj->delete_code($code [,$codeset]); This method is used to delete a code from the data. B must refer to an existing code in the code set. The return value is 1 on success, 0 on an error. =item B $flag = $obj->add_alias($name,$new_name); This method is used to add a new alias to the data. They do not alter the return value of the C function. B must be an existing element name, and B must be unused or an error occurs. The return value is 1 on success, 0 on an error. =item B $flag = $obj->delete_alias($name); This method is used to delete an alias from the data. Once removed, the element may not be referred to by B. B must be one of a list of at least two names that may be used to specify an element. If the element may only be referred to by a single name, you'll need to use the C method to add a new alias first, or the C method to remove the element entirely. If the alias is used as the name in any code set, one of the other names will be used instead. Predicting exactly which one will be used requires you to know the order in which the standards were read, which is not reliable, so you may want to use the C method to force one of the alternate names to be used. The return value is 1 on success, 0 on an error. =item B $flag = $obj->replace_code($code,$new_code [,$codeset]); This method is used to change the official code for an element. At that point, the code returned by the C method would be B instead of the code specified in the standard. B may either be a code that is not in use, or it may be an alias for B (in which case, B becomes and alias and B becomes the "real" code). The original code is kept as an alias, so that the C routines will work with either the code from the standard or the new code. However, the C method will only return the codes which are considered "real" (which means that the list of codes will now contain B, but will not contain B). =item B $flag = $obj->add_code_alias($code,$new_code [,$codeset]); This method adds an alias for the code. At that point, B and B will both work in the C method. However, the C method will still return the original code. =item B These routines delete an alias for the code. These will only work if B is actually an alias. If it is the "real" code, it will not be deleted. You will need to use the C method to switch the real code with one of the aliases, and then delete the alias. =back =head1 TRADITIONAL INTERFACES In addition the the primary OO module, the following modules are included in the distribution for the traditional way of working with code sets. Each module will work with one specific type of code sets. =over 4 =item L, L This includes support for country codes (such as those listed in ISO-3166) to specify the country. Because this module was originally distributed as L, it is also available under that name. =item L, L This includes support for language codes (such as those listed in ISO-639) to specify the language. Because this module was originally distributed as L, it is also available under that name. =item L, L This includes support for currency codes (such as those listed in ISO-4217) to specify the currency. Because this module was originally distributed as L, it is also available under that name. =item L, L This includes support for script codes (such as those listed in ISO-15924) to specify the script. Because this module was originally distributed as L, it is also available under that name. =item L This includes support for language extension codes (such as those listed in the IANA language registry) to specify the language extension. =item L This includes support for language variation codes (such as those listed in the IANA language registry) to specify the language variation. =item L This includes support for language family codes (such as those listed in ISO 639-5) to specify families of languages. =back In addition to the modules above, there are a number of support modules included in the distribution. Any module not listed above falls into that category. These modules are not intended to be used by programmers. They contain functions or data that are used by the modules listed above. No support of any kind is offered for using these modules directly. They may be modified at any time. =head1 COMMON ALIASES As of version 2.00, the modules supported common variants of names. For example, Locale::Country supports variant names for countries, and a few of the most common ones are included in the data. The country code for "United States" is "us", so: country2code('United States'); => "us" Now the following will also return 'us': country2code('United States of America'); country2code('USA'); Any number of common aliases may be included in the data, in addition to the names that come directly from the standards. If you have a common alias for a country, language, or any other of the types of codes, let me know and I'll add it, with some restrictions. For example, the country name "North Korea" never appeared in any of the official sources (instead, it was "Korea, North" or "Korea, Democratic People's Republic of". I would honor a request to add an alias "North Korea" since that's a very common way to specify the country (please don't request this... I've already added it). On the other hand, a request to add Zaire as an alias for "Congo, The Democratic Republic of" will not be honored. The country's official name is no longer Zaire, so adding it as an alias violates the standard. Zaire was kept as an alias in versions of this module prior to 3.00, but it has been removed. Other aliases (if any) which no longer appear in any standard (and which are not common variations of the name in the standards) have also been removed. =head1 RETIRED CODES Occasionally, a code is deprecated, but it may still be desirable to have access to it. Although there is no way to see every code that has ever existed and been deprecated (since most codesets do not have that information available), as of version 3.20, every code which has ever been included in these modules can be referenced. For more information, refer to the documentation on the code2name, name2code, all_codes, and all_names methods above. =head1 SEE ALSO =over 4 =item L The list of all code sets available for each type. =item L A history of changes made to this distribution. =back =head1 KNOWN BUGS AND LIMITATIONS =over 4 =item B Because each code set uses a slightly different list of elements, and they are not necessarily one-to-one, there may be some confusion about the relationship between codes from different code sets. For example, ISO 3166 assigns one code to the country "United States Minor Outlying Islands", but the IANA codes give different codes to different islands (Baker Island, Howland Island, etc.). This may cause some confusion... I've done the best that I could do to minimize it. =item B Currently all names must be all ASCII. I plan on relaxing that limitation in the future. =back =head1 BUGS AND QUESTIONS If you find a bug in Locale::Codes, there are three ways to send it to me. Any of them are fine, so use the method that is easiest for you. =over 4 =item Direct email You are welcome to send it directly to me by email. The email address to use is: sbeck@cpan.org. =item CPAN Bug Tracking You can submit it using the CPAN tracking too. This can be done at the following URL: L =item GitHub You can submit it as an issue on GitHub. This can be done at the following URL: L =back Please do not use other means to report bugs (such as forums for a specific OS or Linux distribution) as it is impossible for me to keep up with all of them. When filing a bug report, please include the following information: =over 4 =item B Please include the version of Locale::Codes you are using. You can get this by using the script: use Locale::Codes; print $Locale::Codes::VERSION,"\n"; =back If you want to report missing or incorrect codes, you must be running the most recent version of Locale::Codes. If you find any problems with the documentation (errors, typos, or items that are not clear), please send them to me. I welcome any suggestions that will allow me to improve the documentation. =head1 AUTHOR Locale::Country and Locale::Language were originally written by Neil Bowers at the Canon Research Centre Europe (CRE). They maintained the distribution from 1997 to 2001. Locale::Currency was originally written by Michael Hennecke and was modified by Neil Bowers for inclusion in the distribution. From 2001 to 2004, maintenance was continued by Neil Bowers. He modified Locale::Currency for inclusion in the distribution. He also added Locale::Script. From 2004-2009, the module was unmaintained. In 2010, maintenance was taken over by Sullivan Beck (sbeck@cpan.org) with Neil Bower's permission. All problems or comments should be sent to him using any of the methods listed above. =head1 COPYRIGHT Copyright (c) 1997-2001 Canon Research Centre Europe (CRE). Copyright (c) 2001 Michael Hennecke (Locale::Currency) Copyright (c) 2001-2010 Neil Bowers Copyright (c) 2010-2018 Sullivan Beck This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut
and B must be unused in the data set or an error occurs (though B may be used in a different data set). For example, to create the fictitious country named "Duchy of Grand Fenwick" with codes "gf" and "fen", use the following: $obj->add_code("fe","Duchy of Grand Fenwick",'alpha-2'); $obj->add_code("fen","Duchy of Grand Fenwick",'alpha-3'); The return value is 1 on success, 0 on an error. =item B $flag = $obj->delete_code($code [,$codeset]); This method is used to delete a code from the data. B must refer to an existing code in the code set. The return value is 1 on success, 0 on an error. =item B $flag = $obj->add_alias($name,$new_name); This method is used to add a new alias to the data. They do not alter the return value of the C function. B must be an existing element name, and B must be unused or an error occurs. The return value is 1 on success, 0 on an error. =item B $flag = $obj->delete_alias($name); This method is used to delete an alias from the data. Once removed, the element may not be referred to by B. B must be one of a list of at least two names that may be used to specify an element. If the element may only be referred to by a single name, you'll need to use the C method to add a new alias first, or the C method to remove the element entirely. If the alias is used as the name in any code set, one of the other names will be used instead. Predicting exactly which one will be used requires you to know the order in which the standards were read, which is not reliable, so you may want to use the C method to force one of the alternate names to be used. The return value is 1 on success, 0 on an error. =item B $flag = $obj->replace_code($code,$new_code [,$codeset]); This method is used to change the official code for an element. At that point, the code returned by the C method would be B instead of the code specified in the standard. B may either be a code that is not in use, or it may be an alias for B (in which case, B becomes and alias and B becomes the "real" code). The original code is kept as an alias, so that the C routines will work with either the code from the standard or the new code. However, the C method will only return the codes which are considered "real" (which means that the list of codes will now contain B, but will not contain B). =item B $flag = $obj->add_code_alias($code,$new_code [,$codeset]); This method adds an alias for the code. At that point, B and B will both work in the C method. However, the C method will still return the original code. =item B These routines delete an alias for the code. These will only work if B is actually an alias. If it is the "real" code, it will not be deleted. You will need to use the C method to switch the real code with one of the aliases, and then delete the alias. =back =head1 TRADITIONAL INTERFACES In addition the the primary OO module, the following modules are included in the distribution for the traditional way of working with code sets. Each module will work with one specific type of code sets. =over 4 =item L, L This includes support for country codes (such as those listed in ISO-3166) to specify the country. Because this module was originally distributed as L, it is also available under that name. =item L, L This includes support for language codes (such as those listed in ISO-639) to specify the language. Because this module was originally distributed as L, it is also available under that name. =item L, L This includes support for currency codes (such as those listed in ISO-4217) to specify the currency. Because this module was originally distributed as L, it is also available under that name. =item L, L This includes support for script codes (such as those listed in ISO-15924) to specify the script. Because this module was originally distributed as L, it is also available under that name. =item L This includes support for language extension codes (such as those listed in the IANA language registry) to specify the language extension. =item L This includes support for language variation codes (such as those listed in the IANA language registry) to specify the language variation. =item L This includes support for language family codes (such as those listed in ISO 639-5) to specify families of languages. =back In addition to the modules above, there are a number of support modules included in the distribution. Any module not listed above falls into that category. These modules are not intended to be used by programmers. They contain functions or data that are used by the modules listed above. No support of any kind is offered for using these modules directly. They may be modified at any time. =head1 COMMON ALIASES As of version 2.00, the modules supported common variants of names. For example, Locale::Country supports variant names for countries, and a few of the most common ones are included in the data. The country code for "United States" is "us", so: country2code('United States'); => "us" Now the following will also return 'us': country2code('United States of America'); country2code('USA'); Any number of common aliases may be included in the data, in addition to the names that come directly from the standards. If you have a common alias for a country, language, or any other of the types of codes, let me know and I'll add it, with some restrictions. For example, the country name "North Korea" never appeared in any of the official sources (instead, it was "Korea, North" or "Korea, Democratic People's Republic of". I would honor a request to add an alias "North Korea" since that's a very common way to specify the country (please don't request this... I've already added it). On the other hand, a request to add Zaire as an alias for "Congo, The Democratic Republic of" will not be honored. The country's official name is no longer Zaire, so adding it as an alias violates the standard. Zaire was kept as an alias in versions of this module prior to 3.00, but it has been removed. Other aliases (if any) which no longer appear in any standard (and which are not common variations of the name in the standards) have also been removed. =head1 RETIRED CODES Occasionally, a code is deprecated, but it may still be desirable to have access to it. Although there is no way to see every code that has ever existed and been deprecated (since most codesets do not have that information available), as of version 3.20, every code which has ever been included in these modules can be referenced. For more information, refer to the documentation on the code2name, name2code, all_codes, and all_names methods above. =head1 SEE ALSO =over 4 =item L The list of all code sets available for each type. =item L A history of changes made to this distribution. =back =head1 KNOWN BUGS AND LIMITATIONS =over 4 =item B Because each code set uses a slightly different list of elements, and they are not necessarily one-to-one, there may be some confusion about the relationship between codes from different code sets. For example, ISO 3166 assigns one code to the country "United States Minor Outlying Islands", but the IANA codes give different codes to different islands (Baker Island, Howland Island, etc.). This may cause some confusion... I've done the best that I could do to minimize it. =item B Currently all names must be all ASCII. I plan on relaxing that limitation in the future. =back =head1 BUGS AND QUESTIONS If you find a bug in Locale::Codes, there are three ways to send it to me. Any of them are fine, so use the method that is easiest for you. =over 4 =item Direct email You are welcome to send it directly to me by email. The email address to use is: sbeck@cpan.org. =item CPAN Bug Tracking You can submit it using the CPAN tracking too. This can be done at the following URL: L =item GitHub You can submit it as an issue on GitHub. This can be done at the following URL: L =back Please do not use other means to report bugs (such as forums for a specific OS or Linux distribution) as it is impossible for me to keep up with all of them. When filing a bug report, please include the following information: =over 4 =item B Please include the version of Locale::Codes you are using. You can get this by using the script: use Locale::Codes; print $Locale::Codes::VERSION,"\n"; =back If you want to report missing or incorrect codes, you must be running the most recent version of Locale::Codes. If you find any problems with the documentation (errors, typos, or items that are not clear), please send them to me. I welcome any suggestions that will allow me to improve the documentation. =head1 AUTHOR Locale::Country and Locale::Language were originally written by Neil Bowers at the Canon Research Centre Europe (CRE). They maintained the distribution from 1997 to 2001. Locale::Currency was originally written by Michael Hennecke and was modified by Neil Bowers for inclusion in the distribution. From 2001 to 2004, maintenance was continued by Neil Bowers. He modified Locale::Currency for inclusion in the distribution. He also added Locale::Script. From 2004-2009, the module was unmaintained. In 2010, maintenance was taken over by Sullivan Beck (sbeck@cpan.org) with Neil Bower's permission. All problems or comments should be sent to him using any of the methods listed above. =head1 COPYRIGHT Copyright (c) 1997-2001 Canon Research Centre Europe (CRE). Copyright (c) 2001 Michael Hennecke (Locale::Currency) Copyright (c) 2001-2010 Neil Bowers Copyright (c) 2010-2018 Sullivan Beck This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut
must refer to an existing code in the code set. The return value is 1 on success, 0 on an error. =item B $flag = $obj->add_alias($name,$new_name); This method is used to add a new alias to the data. They do not alter the return value of the C function. B must be an existing element name, and B must be unused or an error occurs. The return value is 1 on success, 0 on an error. =item B $flag = $obj->delete_alias($name); This method is used to delete an alias from the data. Once removed, the element may not be referred to by B. B must be one of a list of at least two names that may be used to specify an element. If the element may only be referred to by a single name, you'll need to use the C method to add a new alias first, or the C method to remove the element entirely. If the alias is used as the name in any code set, one of the other names will be used instead. Predicting exactly which one will be used requires you to know the order in which the standards were read, which is not reliable, so you may want to use the C method to force one of the alternate names to be used. The return value is 1 on success, 0 on an error. =item B $flag = $obj->replace_code($code,$new_code [,$codeset]); This method is used to change the official code for an element. At that point, the code returned by the C method would be B instead of the code specified in the standard. B may either be a code that is not in use, or it may be an alias for B (in which case, B becomes and alias and B becomes the "real" code). The original code is kept as an alias, so that the C routines will work with either the code from the standard or the new code. However, the C method will only return the codes which are considered "real" (which means that the list of codes will now contain B, but will not contain B). =item B $flag = $obj->add_code_alias($code,$new_code [,$codeset]); This method adds an alias for the code. At that point, B and B will both work in the C method. However, the C method will still return the original code. =item B These routines delete an alias for the code. These will only work if B is actually an alias. If it is the "real" code, it will not be deleted. You will need to use the C method to switch the real code with one of the aliases, and then delete the alias. =back =head1 TRADITIONAL INTERFACES In addition the the primary OO module, the following modules are included in the distribution for the traditional way of working with code sets. Each module will work with one specific type of code sets. =over 4 =item L, L This includes support for country codes (such as those listed in ISO-3166) to specify the country. Because this module was originally distributed as L, it is also available under that name. =item L, L This includes support for language codes (such as those listed in ISO-639) to specify the language. Because this module was originally distributed as L, it is also available under that name. =item L, L This includes support for currency codes (such as those listed in ISO-4217) to specify the currency. Because this module was originally distributed as L, it is also available under that name. =item L, L This includes support for script codes (such as those listed in ISO-15924) to specify the script. Because this module was originally distributed as L, it is also available under that name. =item L This includes support for language extension codes (such as those listed in the IANA language registry) to specify the language extension. =item L This includes support for language variation codes (such as those listed in the IANA language registry) to specify the language variation. =item L This includes support for language family codes (such as those listed in ISO 639-5) to specify families of languages. =back In addition to the modules above, there are a number of support modules included in the distribution. Any module not listed above falls into that category. These modules are not intended to be used by programmers. They contain functions or data that are used by the modules listed above. No support of any kind is offered for using these modules directly. They may be modified at any time. =head1 COMMON ALIASES As of version 2.00, the modules supported common variants of names. For example, Locale::Country supports variant names for countries, and a few of the most common ones are included in the data. The country code for "United States" is "us", so: country2code('United States'); => "us" Now the following will also return 'us': country2code('United States of America'); country2code('USA'); Any number of common aliases may be included in the data, in addition to the names that come directly from the standards. If you have a common alias for a country, language, or any other of the types of codes, let me know and I'll add it, with some restrictions. For example, the country name "North Korea" never appeared in any of the official sources (instead, it was "Korea, North" or "Korea, Democratic People's Republic of". I would honor a request to add an alias "North Korea" since that's a very common way to specify the country (please don't request this... I've already added it). On the other hand, a request to add Zaire as an alias for "Congo, The Democratic Republic of" will not be honored. The country's official name is no longer Zaire, so adding it as an alias violates the standard. Zaire was kept as an alias in versions of this module prior to 3.00, but it has been removed. Other aliases (if any) which no longer appear in any standard (and which are not common variations of the name in the standards) have also been removed. =head1 RETIRED CODES Occasionally, a code is deprecated, but it may still be desirable to have access to it. Although there is no way to see every code that has ever existed and been deprecated (since most codesets do not have that information available), as of version 3.20, every code which has ever been included in these modules can be referenced. For more information, refer to the documentation on the code2name, name2code, all_codes, and all_names methods above. =head1 SEE ALSO =over 4 =item L The list of all code sets available for each type. =item L A history of changes made to this distribution. =back =head1 KNOWN BUGS AND LIMITATIONS =over 4 =item B Because each code set uses a slightly different list of elements, and they are not necessarily one-to-one, there may be some confusion about the relationship between codes from different code sets. For example, ISO 3166 assigns one code to the country "United States Minor Outlying Islands", but the IANA codes give different codes to different islands (Baker Island, Howland Island, etc.). This may cause some confusion... I've done the best that I could do to minimize it. =item B Currently all names must be all ASCII. I plan on relaxing that limitation in the future. =back =head1 BUGS AND QUESTIONS If you find a bug in Locale::Codes, there are three ways to send it to me. Any of them are fine, so use the method that is easiest for you. =over 4 =item Direct email You are welcome to send it directly to me by email. The email address to use is: sbeck@cpan.org. =item CPAN Bug Tracking You can submit it using the CPAN tracking too. This can be done at the following URL: L =item GitHub You can submit it as an issue on GitHub. This can be done at the following URL: L =back Please do not use other means to report bugs (such as forums for a specific OS or Linux distribution) as it is impossible for me to keep up with all of them. When filing a bug report, please include the following information: =over 4 =item B Please include the version of Locale::Codes you are using. You can get this by using the script: use Locale::Codes; print $Locale::Codes::VERSION,"\n"; =back If you want to report missing or incorrect codes, you must be running the most recent version of Locale::Codes. If you find any problems with the documentation (errors, typos, or items that are not clear), please send them to me. I welcome any suggestions that will allow me to improve the documentation. =head1 AUTHOR Locale::Country and Locale::Language were originally written by Neil Bowers at the Canon Research Centre Europe (CRE). They maintained the distribution from 1997 to 2001. Locale::Currency was originally written by Michael Hennecke and was modified by Neil Bowers for inclusion in the distribution. From 2001 to 2004, maintenance was continued by Neil Bowers. He modified Locale::Currency for inclusion in the distribution. He also added Locale::Script. From 2004-2009, the module was unmaintained. In 2010, maintenance was taken over by Sullivan Beck (sbeck@cpan.org) with Neil Bower's permission. All problems or comments should be sent to him using any of the methods listed above. =head1 COPYRIGHT Copyright (c) 1997-2001 Canon Research Centre Europe (CRE). Copyright (c) 2001 Michael Hennecke (Locale::Currency) Copyright (c) 2001-2010 Neil Bowers Copyright (c) 2010-2018 Sullivan Beck This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut
(in which case, B becomes and alias and B becomes the "real" code). The original code is kept as an alias, so that the C routines will work with either the code from the standard or the new code. However, the C method will only return the codes which are considered "real" (which means that the list of codes will now contain B, but will not contain B). =item B $flag = $obj->add_code_alias($code,$new_code [,$codeset]); This method adds an alias for the code. At that point, B and B will both work in the C method. However, the C method will still return the original code. =item B These routines delete an alias for the code. These will only work if B is actually an alias. If it is the "real" code, it will not be deleted. You will need to use the C method to switch the real code with one of the aliases, and then delete the alias. =back =head1 TRADITIONAL INTERFACES In addition the the primary OO module, the following modules are included in the distribution for the traditional way of working with code sets. Each module will work with one specific type of code sets. =over 4 =item L, L This includes support for country codes (such as those listed in ISO-3166) to specify the country. Because this module was originally distributed as L, it is also available under that name. =item L, L This includes support for language codes (such as those listed in ISO-639) to specify the language. Because this module was originally distributed as L, it is also available under that name. =item L, L This includes support for currency codes (such as those listed in ISO-4217) to specify the currency. Because this module was originally distributed as L, it is also available under that name. =item L, L This includes support for script codes (such as those listed in ISO-15924) to specify the script. Because this module was originally distributed as L, it is also available under that name. =item L This includes support for language extension codes (such as those listed in the IANA language registry) to specify the language extension. =item L This includes support for language variation codes (such as those listed in the IANA language registry) to specify the language variation. =item L This includes support for language family codes (such as those listed in ISO 639-5) to specify families of languages. =back In addition to the modules above, there are a number of support modules included in the distribution. Any module not listed above falls into that category. These modules are not intended to be used by programmers. They contain functions or data that are used by the modules listed above. No support of any kind is offered for using these modules directly. They may be modified at any time. =head1 COMMON ALIASES As of version 2.00, the modules supported common variants of names. For example, Locale::Country supports variant names for countries, and a few of the most common ones are included in the data. The country code for "United States" is "us", so: country2code('United States'); => "us" Now the following will also return 'us': country2code('United States of America'); country2code('USA'); Any number of common aliases may be included in the data, in addition to the names that come directly from the standards. If you have a common alias for a country, language, or any other of the types of codes, let me know and I'll add it, with some restrictions. For example, the country name "North Korea" never appeared in any of the official sources (instead, it was "Korea, North" or "Korea, Democratic People's Republic of". I would honor a request to add an alias "North Korea" since that's a very common way to specify the country (please don't request this... I've already added it). On the other hand, a request to add Zaire as an alias for "Congo, The Democratic Republic of" will not be honored. The country's official name is no longer Zaire, so adding it as an alias violates the standard. Zaire was kept as an alias in versions of this module prior to 3.00, but it has been removed. Other aliases (if any) which no longer appear in any standard (and which are not common variations of the name in the standards) have also been removed. =head1 RETIRED CODES Occasionally, a code is deprecated, but it may still be desirable to have access to it. Although there is no way to see every code that has ever existed and been deprecated (since most codesets do not have that information available), as of version 3.20, every code which has ever been included in these modules can be referenced. For more information, refer to the documentation on the code2name, name2code, all_codes, and all_names methods above. =head1 SEE ALSO =over 4 =item L The list of all code sets available for each type. =item L A history of changes made to this distribution. =back =head1 KNOWN BUGS AND LIMITATIONS =over 4 =item B Because each code set uses a slightly different list of elements, and they are not necessarily one-to-one, there may be some confusion about the relationship between codes from different code sets. For example, ISO 3166 assigns one code to the country "United States Minor Outlying Islands", but the IANA codes give different codes to different islands (Baker Island, Howland Island, etc.). This may cause some confusion... I've done the best that I could do to minimize it. =item B Currently all names must be all ASCII. I plan on relaxing that limitation in the future. =back =head1 BUGS AND QUESTIONS If you find a bug in Locale::Codes, there are three ways to send it to me. Any of them are fine, so use the method that is easiest for you. =over 4 =item Direct email You are welcome to send it directly to me by email. The email address to use is: sbeck@cpan.org. =item CPAN Bug Tracking You can submit it using the CPAN tracking too. This can be done at the following URL: L =item GitHub You can submit it as an issue on GitHub. This can be done at the following URL: L =back Please do not use other means to report bugs (such as forums for a specific OS or Linux distribution) as it is impossible for me to keep up with all of them. When filing a bug report, please include the following information: =over 4 =item B Please include the version of Locale::Codes you are using. You can get this by using the script: use Locale::Codes; print $Locale::Codes::VERSION,"\n"; =back If you want to report missing or incorrect codes, you must be running the most recent version of Locale::Codes. If you find any problems with the documentation (errors, typos, or items that are not clear), please send them to me. I welcome any suggestions that will allow me to improve the documentation. =head1 AUTHOR Locale::Country and Locale::Language were originally written by Neil Bowers at the Canon Research Centre Europe (CRE). They maintained the distribution from 1997 to 2001. Locale::Currency was originally written by Michael Hennecke and was modified by Neil Bowers for inclusion in the distribution. From 2001 to 2004, maintenance was continued by Neil Bowers. He modified Locale::Currency for inclusion in the distribution. He also added Locale::Script. From 2004-2009, the module was unmaintained. In 2010, maintenance was taken over by Sullivan Beck (sbeck@cpan.org) with Neil Bower's permission. All problems or comments should be sent to him using any of the methods listed above. =head1 COPYRIGHT Copyright (c) 1997-2001 Canon Research Centre Europe (CRE). Copyright (c) 2001 Michael Hennecke (Locale::Currency) Copyright (c) 2001-2010 Neil Bowers Copyright (c) 2010-2018 Sullivan Beck This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut
becomes and alias and B becomes the "real" code). The original code is kept as an alias, so that the C routines will work with either the code from the standard or the new code. However, the C method will only return the codes which are considered "real" (which means that the list of codes will now contain B, but will not contain B). =item B $flag = $obj->add_code_alias($code,$new_code [,$codeset]); This method adds an alias for the code. At that point, B and B will both work in the C method. However, the C method will still return the original code. =item B These routines delete an alias for the code. These will only work if B is actually an alias. If it is the "real" code, it will not be deleted. You will need to use the C method to switch the real code with one of the aliases, and then delete the alias. =back =head1 TRADITIONAL INTERFACES In addition the the primary OO module, the following modules are included in the distribution for the traditional way of working with code sets. Each module will work with one specific type of code sets. =over 4 =item L, L This includes support for country codes (such as those listed in ISO-3166) to specify the country. Because this module was originally distributed as L, it is also available under that name. =item L, L This includes support for language codes (such as those listed in ISO-639) to specify the language. Because this module was originally distributed as L, it is also available under that name. =item L, L This includes support for currency codes (such as those listed in ISO-4217) to specify the currency. Because this module was originally distributed as L, it is also available under that name. =item L, L This includes support for script codes (such as those listed in ISO-15924) to specify the script. Because this module was originally distributed as L, it is also available under that name. =item L This includes support for language extension codes (such as those listed in the IANA language registry) to specify the language extension. =item L This includes support for language variation codes (such as those listed in the IANA language registry) to specify the language variation. =item L This includes support for language family codes (such as those listed in ISO 639-5) to specify families of languages. =back In addition to the modules above, there are a number of support modules included in the distribution. Any module not listed above falls into that category. These modules are not intended to be used by programmers. They contain functions or data that are used by the modules listed above. No support of any kind is offered for using these modules directly. They may be modified at any time. =head1 COMMON ALIASES As of version 2.00, the modules supported common variants of names. For example, Locale::Country supports variant names for countries, and a few of the most common ones are included in the data. The country code for "United States" is "us", so: country2code('United States'); => "us" Now the following will also return 'us': country2code('United States of America'); country2code('USA'); Any number of common aliases may be included in the data, in addition to the names that come directly from the standards. If you have a common alias for a country, language, or any other of the types of codes, let me know and I'll add it, with some restrictions. For example, the country name "North Korea" never appeared in any of the official sources (instead, it was "Korea, North" or "Korea, Democratic People's Republic of". I would honor a request to add an alias "North Korea" since that's a very common way to specify the country (please don't request this... I've already added it). On the other hand, a request to add Zaire as an alias for "Congo, The Democratic Republic of" will not be honored. The country's official name is no longer Zaire, so adding it as an alias violates the standard. Zaire was kept as an alias in versions of this module prior to 3.00, but it has been removed. Other aliases (if any) which no longer appear in any standard (and which are not common variations of the name in the standards) have also been removed. =head1 RETIRED CODES Occasionally, a code is deprecated, but it may still be desirable to have access to it. Although there is no way to see every code that has ever existed and been deprecated (since most codesets do not have that information available), as of version 3.20, every code which has ever been included in these modules can be referenced. For more information, refer to the documentation on the code2name, name2code, all_codes, and all_names methods above. =head1 SEE ALSO =over 4 =item L The list of all code sets available for each type. =item L A history of changes made to this distribution. =back =head1 KNOWN BUGS AND LIMITATIONS =over 4 =item B Because each code set uses a slightly different list of elements, and they are not necessarily one-to-one, there may be some confusion about the relationship between codes from different code sets. For example, ISO 3166 assigns one code to the country "United States Minor Outlying Islands", but the IANA codes give different codes to different islands (Baker Island, Howland Island, etc.). This may cause some confusion... I've done the best that I could do to minimize it. =item B Currently all names must be all ASCII. I plan on relaxing that limitation in the future. =back =head1 BUGS AND QUESTIONS If you find a bug in Locale::Codes, there are three ways to send it to me. Any of them are fine, so use the method that is easiest for you. =over 4 =item Direct email You are welcome to send it directly to me by email. The email address to use is: sbeck@cpan.org. =item CPAN Bug Tracking You can submit it using the CPAN tracking too. This can be done at the following URL: L =item GitHub You can submit it as an issue on GitHub. This can be done at the following URL: L =back Please do not use other means to report bugs (such as forums for a specific OS or Linux distribution) as it is impossible for me to keep up with all of them. When filing a bug report, please include the following information: =over 4 =item B Please include the version of Locale::Codes you are using. You can get this by using the script: use Locale::Codes; print $Locale::Codes::VERSION,"\n"; =back If you want to report missing or incorrect codes, you must be running the most recent version of Locale::Codes. If you find any problems with the documentation (errors, typos, or items that are not clear), please send them to me. I welcome any suggestions that will allow me to improve the documentation. =head1 AUTHOR Locale::Country and Locale::Language were originally written by Neil Bowers at the Canon Research Centre Europe (CRE). They maintained the distribution from 1997 to 2001. Locale::Currency was originally written by Michael Hennecke and was modified by Neil Bowers for inclusion in the distribution. From 2001 to 2004, maintenance was continued by Neil Bowers. He modified Locale::Currency for inclusion in the distribution. He also added Locale::Script. From 2004-2009, the module was unmaintained. In 2010, maintenance was taken over by Sullivan Beck (sbeck@cpan.org) with Neil Bower's permission. All problems or comments should be sent to him using any of the methods listed above. =head1 COPYRIGHT Copyright (c) 1997-2001 Canon Research Centre Europe (CRE). Copyright (c) 2001 Michael Hennecke (Locale::Currency) Copyright (c) 2001-2010 Neil Bowers Copyright (c) 2010-2018 Sullivan Beck This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut
). =item B $flag = $obj->add_code_alias($code,$new_code [,$codeset]); This method adds an alias for the code. At that point, B and B will both work in the C method. However, the C method will still return the original code. =item B These routines delete an alias for the code. These will only work if B is actually an alias. If it is the "real" code, it will not be deleted. You will need to use the C method to switch the real code with one of the aliases, and then delete the alias. =back =head1 TRADITIONAL INTERFACES In addition the the primary OO module, the following modules are included in the distribution for the traditional way of working with code sets. Each module will work with one specific type of code sets. =over 4 =item L, L This includes support for country codes (such as those listed in ISO-3166) to specify the country. Because this module was originally distributed as L, it is also available under that name. =item L, L This includes support for language codes (such as those listed in ISO-639) to specify the language. Because this module was originally distributed as L, it is also available under that name. =item L, L This includes support for currency codes (such as those listed in ISO-4217) to specify the currency. Because this module was originally distributed as L, it is also available under that name. =item L, L This includes support for script codes (such as those listed in ISO-15924) to specify the script. Because this module was originally distributed as L, it is also available under that name. =item L This includes support for language extension codes (such as those listed in the IANA language registry) to specify the language extension. =item L This includes support for language variation codes (such as those listed in the IANA language registry) to specify the language variation. =item L This includes support for language family codes (such as those listed in ISO 639-5) to specify families of languages. =back In addition to the modules above, there are a number of support modules included in the distribution. Any module not listed above falls into that category. These modules are not intended to be used by programmers. They contain functions or data that are used by the modules listed above. No support of any kind is offered for using these modules directly. They may be modified at any time. =head1 COMMON ALIASES As of version 2.00, the modules supported common variants of names. For example, Locale::Country supports variant names for countries, and a few of the most common ones are included in the data. The country code for "United States" is "us", so: country2code('United States'); => "us" Now the following will also return 'us': country2code('United States of America'); country2code('USA'); Any number of common aliases may be included in the data, in addition to the names that come directly from the standards. If you have a common alias for a country, language, or any other of the types of codes, let me know and I'll add it, with some restrictions. For example, the country name "North Korea" never appeared in any of the official sources (instead, it was "Korea, North" or "Korea, Democratic People's Republic of". I would honor a request to add an alias "North Korea" since that's a very common way to specify the country (please don't request this... I've already added it). On the other hand, a request to add Zaire as an alias for "Congo, The Democratic Republic of" will not be honored. The country's official name is no longer Zaire, so adding it as an alias violates the standard. Zaire was kept as an alias in versions of this module prior to 3.00, but it has been removed. Other aliases (if any) which no longer appear in any standard (and which are not common variations of the name in the standards) have also been removed. =head1 RETIRED CODES Occasionally, a code is deprecated, but it may still be desirable to have access to it. Although there is no way to see every code that has ever existed and been deprecated (since most codesets do not have that information available), as of version 3.20, every code which has ever been included in these modules can be referenced. For more information, refer to the documentation on the code2name, name2code, all_codes, and all_names methods above. =head1 SEE ALSO =over 4 =item L The list of all code sets available for each type. =item L A history of changes made to this distribution. =back =head1 KNOWN BUGS AND LIMITATIONS =over 4 =item B Because each code set uses a slightly different list of elements, and they are not necessarily one-to-one, there may be some confusion about the relationship between codes from different code sets. For example, ISO 3166 assigns one code to the country "United States Minor Outlying Islands", but the IANA codes give different codes to different islands (Baker Island, Howland Island, etc.). This may cause some confusion... I've done the best that I could do to minimize it. =item B Currently all names must be all ASCII. I plan on relaxing that limitation in the future. =back =head1 BUGS AND QUESTIONS If you find a bug in Locale::Codes, there are three ways to send it to me. Any of them are fine, so use the method that is easiest for you. =over 4 =item Direct email You are welcome to send it directly to me by email. The email address to use is: sbeck@cpan.org. =item CPAN Bug Tracking You can submit it using the CPAN tracking too. This can be done at the following URL: L =item GitHub You can submit it as an issue on GitHub. This can be done at the following URL: L =back Please do not use other means to report bugs (such as forums for a specific OS or Linux distribution) as it is impossible for me to keep up with all of them. When filing a bug report, please include the following information: =over 4 =item B Please include the version of Locale::Codes you are using. You can get this by using the script: use Locale::Codes; print $Locale::Codes::VERSION,"\n"; =back If you want to report missing or incorrect codes, you must be running the most recent version of Locale::Codes. If you find any problems with the documentation (errors, typos, or items that are not clear), please send them to me. I welcome any suggestions that will allow me to improve the documentation. =head1 AUTHOR Locale::Country and Locale::Language were originally written by Neil Bowers at the Canon Research Centre Europe (CRE). They maintained the distribution from 1997 to 2001. Locale::Currency was originally written by Michael Hennecke and was modified by Neil Bowers for inclusion in the distribution. From 2001 to 2004, maintenance was continued by Neil Bowers. He modified Locale::Currency for inclusion in the distribution. He also added Locale::Script. From 2004-2009, the module was unmaintained. In 2010, maintenance was taken over by Sullivan Beck (sbeck@cpan.org) with Neil Bower's permission. All problems or comments should be sent to him using any of the methods listed above. =head1 COPYRIGHT Copyright (c) 1997-2001 Canon Research Centre Europe (CRE). Copyright (c) 2001 Michael Hennecke (Locale::Currency) Copyright (c) 2001-2010 Neil Bowers Copyright (c) 2010-2018 Sullivan Beck This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut
will both work in the C method. However, the C method will still return the original code. =item B These routines delete an alias for the code. These will only work if B is actually an alias. If it is the "real" code, it will not be deleted. You will need to use the C method to switch the real code with one of the aliases, and then delete the alias. =back =head1 TRADITIONAL INTERFACES In addition the the primary OO module, the following modules are included in the distribution for the traditional way of working with code sets. Each module will work with one specific type of code sets. =over 4 =item L, L This includes support for country codes (such as those listed in ISO-3166) to specify the country. Because this module was originally distributed as L, it is also available under that name. =item L, L This includes support for language codes (such as those listed in ISO-639) to specify the language. Because this module was originally distributed as L, it is also available under that name. =item L, L This includes support for currency codes (such as those listed in ISO-4217) to specify the currency. Because this module was originally distributed as L, it is also available under that name. =item L, L This includes support for script codes (such as those listed in ISO-15924) to specify the script. Because this module was originally distributed as L, it is also available under that name. =item L This includes support for language extension codes (such as those listed in the IANA language registry) to specify the language extension. =item L This includes support for language variation codes (such as those listed in the IANA language registry) to specify the language variation. =item L This includes support for language family codes (such as those listed in ISO 639-5) to specify families of languages. =back In addition to the modules above, there are a number of support modules included in the distribution. Any module not listed above falls into that category. These modules are not intended to be used by programmers. They contain functions or data that are used by the modules listed above. No support of any kind is offered for using these modules directly. They may be modified at any time. =head1 COMMON ALIASES As of version 2.00, the modules supported common variants of names. For example, Locale::Country supports variant names for countries, and a few of the most common ones are included in the data. The country code for "United States" is "us", so: country2code('United States'); => "us" Now the following will also return 'us': country2code('United States of America'); country2code('USA'); Any number of common aliases may be included in the data, in addition to the names that come directly from the standards. If you have a common alias for a country, language, or any other of the types of codes, let me know and I'll add it, with some restrictions. For example, the country name "North Korea" never appeared in any of the official sources (instead, it was "Korea, North" or "Korea, Democratic People's Republic of". I would honor a request to add an alias "North Korea" since that's a very common way to specify the country (please don't request this... I've already added it). On the other hand, a request to add Zaire as an alias for "Congo, The Democratic Republic of" will not be honored. The country's official name is no longer Zaire, so adding it as an alias violates the standard. Zaire was kept as an alias in versions of this module prior to 3.00, but it has been removed. Other aliases (if any) which no longer appear in any standard (and which are not common variations of the name in the standards) have also been removed. =head1 RETIRED CODES Occasionally, a code is deprecated, but it may still be desirable to have access to it. Although there is no way to see every code that has ever existed and been deprecated (since most codesets do not have that information available), as of version 3.20, every code which has ever been included in these modules can be referenced. For more information, refer to the documentation on the code2name, name2code, all_codes, and all_names methods above. =head1 SEE ALSO =over 4 =item L The list of all code sets available for each type. =item L A history of changes made to this distribution. =back =head1 KNOWN BUGS AND LIMITATIONS =over 4 =item B Because each code set uses a slightly different list of elements, and they are not necessarily one-to-one, there may be some confusion about the relationship between codes from different code sets. For example, ISO 3166 assigns one code to the country "United States Minor Outlying Islands", but the IANA codes give different codes to different islands (Baker Island, Howland Island, etc.). This may cause some confusion... I've done the best that I could do to minimize it. =item B Currently all names must be all ASCII. I plan on relaxing that limitation in the future. =back =head1 BUGS AND QUESTIONS If you find a bug in Locale::Codes, there are three ways to send it to me. Any of them are fine, so use the method that is easiest for you. =over 4 =item Direct email You are welcome to send it directly to me by email. The email address to use is: sbeck@cpan.org. =item CPAN Bug Tracking You can submit it using the CPAN tracking too. This can be done at the following URL: L =item GitHub You can submit it as an issue on GitHub. This can be done at the following URL: L =back Please do not use other means to report bugs (such as forums for a specific OS or Linux distribution) as it is impossible for me to keep up with all of them. When filing a bug report, please include the following information: =over 4 =item B Please include the version of Locale::Codes you are using. You can get this by using the script: use Locale::Codes; print $Locale::Codes::VERSION,"\n"; =back If you want to report missing or incorrect codes, you must be running the most recent version of Locale::Codes. If you find any problems with the documentation (errors, typos, or items that are not clear), please send them to me. I welcome any suggestions that will allow me to improve the documentation. =head1 AUTHOR Locale::Country and Locale::Language were originally written by Neil Bowers at the Canon Research Centre Europe (CRE). They maintained the distribution from 1997 to 2001. Locale::Currency was originally written by Michael Hennecke and was modified by Neil Bowers for inclusion in the distribution. From 2001 to 2004, maintenance was continued by Neil Bowers. He modified Locale::Currency for inclusion in the distribution. He also added Locale::Script. From 2004-2009, the module was unmaintained. In 2010, maintenance was taken over by Sullivan Beck (sbeck@cpan.org) with Neil Bower's permission. All problems or comments should be sent to him using any of the methods listed above. =head1 COPYRIGHT Copyright (c) 1997-2001 Canon Research Centre Europe (CRE). Copyright (c) 2001 Michael Hennecke (Locale::Currency) Copyright (c) 2001-2010 Neil Bowers Copyright (c) 2010-2018 Sullivan Beck This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut
is actually an alias. If it is the "real" code, it will not be deleted. You will need to use the C method to switch the real code with one of the aliases, and then delete the alias. =back =head1 TRADITIONAL INTERFACES In addition the the primary OO module, the following modules are included in the distribution for the traditional way of working with code sets. Each module will work with one specific type of code sets. =over 4 =item L, L This includes support for country codes (such as those listed in ISO-3166) to specify the country. Because this module was originally distributed as L, it is also available under that name. =item L, L This includes support for language codes (such as those listed in ISO-639) to specify the language. Because this module was originally distributed as L, it is also available under that name. =item L, L This includes support for currency codes (such as those listed in ISO-4217) to specify the currency. Because this module was originally distributed as L, it is also available under that name. =item L, L This includes support for script codes (such as those listed in ISO-15924) to specify the script. Because this module was originally distributed as L, it is also available under that name. =item L This includes support for language extension codes (such as those listed in the IANA language registry) to specify the language extension. =item L This includes support for language variation codes (such as those listed in the IANA language registry) to specify the language variation. =item L This includes support for language family codes (such as those listed in ISO 639-5) to specify families of languages. =back In addition to the modules above, there are a number of support modules included in the distribution. Any module not listed above falls into that category. These modules are not intended to be used by programmers. They contain functions or data that are used by the modules listed above. No support of any kind is offered for using these modules directly. They may be modified at any time. =head1 COMMON ALIASES As of version 2.00, the modules supported common variants of names. For example, Locale::Country supports variant names for countries, and a few of the most common ones are included in the data. The country code for "United States" is "us", so: country2code('United States'); => "us" Now the following will also return 'us': country2code('United States of America'); country2code('USA'); Any number of common aliases may be included in the data, in addition to the names that come directly from the standards. If you have a common alias for a country, language, or any other of the types of codes, let me know and I'll add it, with some restrictions. For example, the country name "North Korea" never appeared in any of the official sources (instead, it was "Korea, North" or "Korea, Democratic People's Republic of". I would honor a request to add an alias "North Korea" since that's a very common way to specify the country (please don't request this... I've already added it). On the other hand, a request to add Zaire as an alias for "Congo, The Democratic Republic of" will not be honored. The country's official name is no longer Zaire, so adding it as an alias violates the standard. Zaire was kept as an alias in versions of this module prior to 3.00, but it has been removed. Other aliases (if any) which no longer appear in any standard (and which are not common variations of the name in the standards) have also been removed. =head1 RETIRED CODES Occasionally, a code is deprecated, but it may still be desirable to have access to it. Although there is no way to see every code that has ever existed and been deprecated (since most codesets do not have that information available), as of version 3.20, every code which has ever been included in these modules can be referenced. For more information, refer to the documentation on the code2name, name2code, all_codes, and all_names methods above. =head1 SEE ALSO =over 4 =item L The list of all code sets available for each type. =item L A history of changes made to this distribution. =back =head1 KNOWN BUGS AND LIMITATIONS =over 4 =item B Because each code set uses a slightly different list of elements, and they are not necessarily one-to-one, there may be some confusion about the relationship between codes from different code sets. For example, ISO 3166 assigns one code to the country "United States Minor Outlying Islands", but the IANA codes give different codes to different islands (Baker Island, Howland Island, etc.). This may cause some confusion... I've done the best that I could do to minimize it. =item B Currently all names must be all ASCII. I plan on relaxing that limitation in the future. =back =head1 BUGS AND QUESTIONS If you find a bug in Locale::Codes, there are three ways to send it to me. Any of them are fine, so use the method that is easiest for you. =over 4 =item Direct email You are welcome to send it directly to me by email. The email address to use is: sbeck@cpan.org. =item CPAN Bug Tracking You can submit it using the CPAN tracking too. This can be done at the following URL: L =item GitHub You can submit it as an issue on GitHub. This can be done at the following URL: L =back Please do not use other means to report bugs (such as forums for a specific OS or Linux distribution) as it is impossible for me to keep up with all of them. When filing a bug report, please include the following information: =over 4 =item B Please include the version of Locale::Codes you are using. You can get this by using the script: use Locale::Codes; print $Locale::Codes::VERSION,"\n"; =back If you want to report missing or incorrect codes, you must be running the most recent version of Locale::Codes. If you find any problems with the documentation (errors, typos, or items that are not clear), please send them to me. I welcome any suggestions that will allow me to improve the documentation. =head1 AUTHOR Locale::Country and Locale::Language were originally written by Neil Bowers at the Canon Research Centre Europe (CRE). They maintained the distribution from 1997 to 2001. Locale::Currency was originally written by Michael Hennecke and was modified by Neil Bowers for inclusion in the distribution. From 2001 to 2004, maintenance was continued by Neil Bowers. He modified Locale::Currency for inclusion in the distribution. He also added Locale::Script. From 2004-2009, the module was unmaintained. In 2010, maintenance was taken over by Sullivan Beck (sbeck@cpan.org) with Neil Bower's permission. All problems or comments should be sent to him using any of the methods listed above. =head1 COPYRIGHT Copyright (c) 1997-2001 Canon Research Centre Europe (CRE). Copyright (c) 2001 Michael Hennecke (Locale::Currency) Copyright (c) 2001-2010 Neil Bowers Copyright (c) 2010-2018 Sullivan Beck This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut