Finance::Currency::Convert::BChile - Currency conversion module between Chilean Pesos (CLP) and USA Dollars (USD).
Currency conversion module between Chilean Pesos (CLP) and USA Dollars (USD). The conversion rate is obtained from the official source in Chile: the central bank "Banco Central de Chile", from their webpage http://www.bcentral.cl
use Finance::Currency::Convert::BChile; my $conversor = Finance::Currency::Convert::BChile->new(); $conversor->update; print $conversor->CLP2USD(20170);
Creates a new Finance::Currency::Convert::BChile object. Initializes the web robot. You can pass a user agent string as a parameter.
Obtains the data from bcentral page. You can pass a fake value as a parameter. In this case there's no update from bcentral site.
Return the date obtained from Banco Central's site. There's no formatting at all.
Return the value of 1 dollar in CLP. There's no formatting.
Return the rate of transforming CLP in USD. If there's no value data, return -1
Convert the amount received as parameter (CLP) to USD, rounded at two decimals. Returns -1 on error.
Convert the amount received as parameter (USD) to CLP, rounded as integer (no decimals). Returns -1 on error.
<hsalgado at vulcano.cl>
Please report any bugs or feature requests to
bug-finance-currency-convert-bchile at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Finance-Currency-Convert-BChile. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
You can find documentation for this module with the perldoc command.
You can also look for information at:
The data obtained from bcentral site is under this policy: http://www.bcentral.cl/sitio/condiciones-uso.htm
No liability is accepted by the author for abuse or miuse of the software herein. Use of this software is only permitted under the terms stipulated by bcentral.cl.
This module was built for NIC Chile (http://www.nic.cl), who granted its liberation as free software.
Copyright 2007 Hugo Salgado, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.