Data::MoneyCurrency
version 0.04
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.
Data::MoneyCurrency - Get currency information for different currencies
Version 0.04
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 = { # # ... # }
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"];
David D Lowe, <daviddlowe.flimm at gmail.com>
<daviddlowe.flimm at gmail.com>
Please report any bugs or feature requests through the web interface at https://github.com/Flimm/perl5-Data-MoneyCurrency/issues.
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
This is licensed under the MIT license, and includes code from the RubyMoney/Money module, which is also licensed under the MIT license.
edf <edf@opencagedata.com>
This software is copyright (c) 2018 by Opencage Data Limited.
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.