NAME
Data::MoneyCurrency - Get currency information for different currencies
VERSION
Version 0.01
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 to bug-data-moneycurrency at rt.cpan.org
, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Data-MoneyCurrency. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc Data::MoneyCurrency
You can also look for information at:
RT: CPAN's request tracker (report bugs here)
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
Search CPAN
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.