Locale::Country(3)
π NAME π
Locale::Country(3) β the module for dealing with country code sets, and yes bestie it's giving exactly what it says on the tin π
β¨ SYNOPSIS β¨
use Locale::Country;
$name = code2country(CODE);
$code = country2code(NAME);
@codes = all_country_codes();
@names = all_country_names();
π¦ DESCRIPTION π¦
Okay so this module provides access to country code sets. That's the whole assignment. π«Ά
Please refer to the Locale::Codes::Types document for a description of the code sets available. It's the doc you wanna peek at, no cap.
Most of the routines take an optional additional argument which specifies the code set to use. The code set can be specified using the name of a code set, or the perl constant specified in the above document. If not specified, the default code set will be used. Lowkey convenient, highkey iconic.
π ROUTINES π
All routines in this module call the appropriate method in the Locale::Codes module, using an object of type: country. Please refer to the documentation of the Locale::Codes module for details about each function. iykyk.
π The following functions are exported automatically π
code2country(CODE [,CODESET] [,'retired'])β seecode2namein Locale::Codes.code2countrys(CODE [,CODESET])β seecode2namesin Locale::Codes.country2code(NAME [,CODESET] [,'retired'])β seename2codein Locale::Codes.country_code2code(CODE ,CODESET ,CODESET2)β seecode2codein Locale::Codes.all_country_codes([CODESET] [,'retired'])β seeall_codesin Locale::Codes.all_country_names([CODESET] [,'retired'])β seeall_namesin Locale::Codes.
π The following functions are not exported and must be called fully qualified with the package name π
Locale::Country::show_errors(FLAG)β By default, invalid input will produce empty results, but no errors. By passing in a non-zero value ofFLAG, errors will be produced.
See show_errors in Locale::Codes but note that the default for the non-OO modules are to NOT produce errors. β οΈ
Locale::Country::rename_country(CODE ,NEW_NAME [,CODESET])β seerename_codein Locale::Codes.Locale::Country::add_country(CODE ,NAME [,CODESET])β seeadd_codein Locale::Codes.Locale::Country::delete_country(CODE [,CODESET])β seedelete_codein Locale::Codes.Locale::Country::add_country_alias(NAME ,NEW_NAME)β seeadd_aliasin Locale::Codes.Locale::Country::delete_country_alias(NAME)β seedelete_aliasin Locale::Codes.Locale::Country::rename_country_code(CODE ,NEW_CODE [,CODESET])β seereplace_codein Locale::Codes.Locale::Country::add_country_code_alias(CODE ,NEW_CODE [,CODESET])β seeadd_code_aliasin Locale::Codes.Locale::Country::delete_country_code_alias(CODE [,CODESET])β seedelete_code_aliasin Locale::Codes.
π SEE ALSO π
Locale::Codesβ The Locale-Codes distribution. Go look, bestie π«Ά
πΈ AUTHOR πΈ
See Locale::Codes for full author history.
Currently maintained by Sullivan Beck (sbeck@cpan.org).
π COPYRIGHT π
Copyright (c) 2011-2024 Sullivan Beck
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
π That's a wrap on perl v5.42.0, dated 2024-06-23, and this iconic little page is Locale::Country(3). Periodt. π«Ά
π¦ where this page comes from
- opensuse-leap 16.0: perl-Locale-Codes 3.790.0-bp160.1.11 Β· Artistic-1.0 OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms