Lingua::RU::Money::XS - Perl extension for digit conversion to corresponding money sum in Russian.
use Lingua::RU::Money::XS qw(rur2words); print rur2words(123456789012345.00) # outputs "сто двадцать три триллиона четыреста пятьдесят шесть миллиардов семьсот восемьдесят девять миллионов двенадцать тысяч триста сорок пять рублей 00 копеек"
rur2words returns a given as number money sum in words, i.e. 5.10 converts to пять рублей 10 копеек. The target charset is UTF-8.
rur2words
all2words returns a given as number money sum in words, i.e. 5.10 converts to пять рублей десять копеек. The target charset is UTF-8.
all2words
Caution: Current implementation of rur2words and all2words follows the Perl philosophy - anyway the given argument will be casted to double.
double
Caution: Due to previous caution there are several constraints, making conversion impossible. These constraints divide input values into 4 groups listed below
Conversion for specified values make no sense. Thus, conversion croaks for all these values.
Any value in this range converts correctly with the specified accuracy.
Due to the lack for significant digits after the radix point for some values in this range, kopeck value is calculated inaccurate. It simply is replaced with the 0 with the corresponding warning.
Conversion for these values is impossible due to the type overflow. Conversion also croaks for all these values.
Nothing is exported by default.
Please note that this module works only on Perl 5.10.0 and newer.
Caution: Though the version 0.06 of current module works with Perl 5.10.0, it cannot be used in Perl older 5.16.0 due to typo within this package. Please use version 0.07 instead.
Igor Munkin, <imun@cpan.org>
Mons Anderson - The original idea, rationale and motivation
Feel free to report your bugs by mailing to <imun@cpan.org> or via https://rt.cpan.org
Copyright (C) 2017-2018 by Igor Munkin
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.10.0 or, at your option, any later version of Perl 5 you may have available.
To install Lingua::RU::Money::XS, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Lingua::RU::Money::XS
CPAN shell
perl -MCPAN -e shell install Lingua::RU::Money::XS
For more information on module installation, please visit the detailed CPAN module installation guide.