Data::MoneyCurrency - Get information for different currencies
version 0.25
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.
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 = { # # ... # }
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"];
Please report any bugs or feature requests through the web interface at https://github.com/OpenCageData/perl5-Data-MoneyCurrency.
You can find documentation for this module with the perldoc command.
perldoc Data::MoneyCurrency
You can also look for information at:
Meta CPAN
https://metacpan.org/pod/Data::MoneyCurrency
Original version by David D Lowe (FLIMM)
edf <cpan@opencagedata.com>
This software is copyright (c) 2022 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.
To install Data::MoneyCurrency, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Data::MoneyCurrency
CPAN shell
perl -MCPAN -e shell install Data::MoneyCurrency
For more information on module installation, please visit the detailed CPAN module installation guide.