Finance::Currency::Convert::BChile - Currency conversion module


Finance-Currency-Convert-BChile documentation  | view source Contained in the Finance-Currency-Convert-BChile distribution.

Index


NAME

Top

Finance::Currency::Convert::BChile - Currency conversion module between Chilean Pesos (CLP) and USA Dollars (USD).

VERSION

Top

Version 0.032

SYNOPSIS

Top

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);

FUNCTIONS

Top

new

Creates a new Finance::Currency::Convert::BChile object. Initializes the web robot. You can pass a user agent string as a parameter.

update

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.

date

Return the date obtained from Banco Central's site. There's no formatting at all.

dollarValue

Return the value of 1 dollar in CLP. There's no formatting.

rate

Return the rate of transforming CLP in USD. If there's no value data, return -1

CLP2USD

Convert the amount received as parameter (CLP) to USD, rounded at two decimals. Returns -1 on error.

USD2CLP

Convert the amount received as parameter (USD) to CLP, rounded as integer (no decimals). Returns -1 on error.

AUTHOR

Top

Hugo Salgado, <hsalgado at vulcano.cl>

BUGS

Top

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.

SUPPORT

Top

You can find documentation for this module with the perldoc command.

    perldoc Finance::Currency::Convert::BChile




You can also look for information at:

* RT: CPAN's request tracker

http://rt.cpan.org/NoAuth/Bugs.html?Dist=Finance-Currency-Convert-BChile

* AnnoCPAN: Annotated CPAN documentation

http://annocpan.org/dist/Finance-Currency-Convert-BChile

* CPAN Ratings

http://cpanratings.perl.org/d/Finance-Currency-Convert-BChile

* Search CPAN

http://search.cpan.org/dist/Finance-Currency-Convert-BChile

SEE ALSO

Top

  HTML::TokeParser
  LWP::UserAgent

TERMS OF USE

Top

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.

ACKNOWLEDGEMENTS

Top

This module was built for NIC Chile (http://www.nic.cl), who granted its liberation as free software.

COPYRIGHT & LICENSE

Top


Finance-Currency-Convert-BChile documentation  | view source Contained in the Finance-Currency-Convert-BChile distribution.