NAME
Data::MoneyCurrency - Get information for different currencies
VERSION
version 0.27
SYNOPSIS
Get currency information for different currencies.
use Data::MoneyCurrency qw(get_currency);
my $currency = get_currency(currency => 'usd');
# $currency = {
# # ...
# }
my $currency = get_currency(country => 'fr');
# $currency = {
# # ...
# }
This uses some data found in the Ruby library money, but it has no dependency on it, the relevant data files are already included.
EXPORT
SUBROUTINES/METHODS
get_currency
Takes hash of arguments, and returns a reference to hash containing information about that currency (character strings), or undef if the currency or the country is not recognised. Pass either 'currency' or 'country' as the only key of the hash of arguments, with the currency code or the ISO 3166-2 alpha-2 country code respectively.
my $currency = get_currency(currency => 'usd');
# $currency = {
# # ...
# }
my $currency = get_currency(country => 'fr');
# $currency = {
# # ...
# }
get_currencies_for_country
Takes one argument, a country code in ISO 3166-1 alpha-2 format, and returns a reference to an array of strings that are currency codes.
my $rv = get_currencies_for_country('fr');
# $rv = ["eur"];
BUGS
Please report any bugs or feature requests through the web interface at https://github.com/OpenCageData/perl5-Data-MoneyCurrency.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc Data::MoneyCurrency
You can also look for information at:
ACKNOWLEDGEMENTS
Original version by David D Lowe (FLIMM)
AUTHOR
edf <cpan@opencagedata.com>
COPYRIGHT AND LICENSE
This software is copyright (c) 2024 by OpenCage GmbH.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.