NAME
Data::MoneyCurrency - Get currency information for different currencies
VERSION
Version 0.02
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 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 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 format, and returns a reference to an array of strings that are currency codes.
my $rv = get_currencies_for_country('fr');
# $rv = ["eur"];
AUTHOR
David D Lowe, <daviddlowe.flimm at gmail.com>
BUGS
Please report any bugs or feature requests through the web interface at https://github.com/Flimm/perl5-Data-MoneyCurrency/issues.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc Data::MoneyCurrency
You can also look for information at:
ACKNOWLEDGEMENTS
LICENSE AND COPYRIGHT
This is licensed under the MIT license, and includes code from the RubyMoney/Money module, which is also licensed under the MIT license.