27 Apr 2005 15:37:34 UTC
- Distribution: Finance-Currency-Convert-XE
- Module version: 0.10
- Source (raw)
- Browse (raw)
- How to Contribute
- Issues (4)
- Testers (12 / 0 / 0)
- KwaliteeBus factor: 0
- License: unknown
- Activity24 month
- Download (6.44KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest versionBARBIE Barbie
Finance::Currency::Convert::XE - Currency conversion module.
use Finance::Currency::Convert::XE; my $obj = Finance::Currency::Convert::XE->new() || die "Failed to create object\n" ; my $value = $obj->convert( 'source' => 'GBP', 'target' => 'EUR', 'value' => '123.45', 'format' => 'text' ) || die "Could not convert: " . $obj->error . "\n"; my @currencies = $obj->currencies;
Currency conversion module using XE.com's Universal Currency Converter (tm) site.
Creates a new Finance::Currency::Convert::XE object.
Returns a plain array of the currencies available for conversion.
Converts some currency value into another using XE.com's UCC.
An anonymous hash is used to pass parameters. Legal hash keys and values are as follows:
convert( source => $currency_from, target => $currency_to, value => $currency_from_value, format => $print_format );
The format key is optional, and takes one of the following strings:
'number' (returns '12.34') 'symbol' (returns '£12.34') 'text' (returns '12.34 British Pounds') 'abbv' (returns '12.34 GBP')
If format key is omitted, 'number' is assumed and the converted value is returned.
Note that not all countries have symbols in the standard character set. Where known the appropriate currency symbol is used, otherwise the generic currency symbol is used.
It should also be noted that there is a recommendation to use only the standardised three letter abbreviation ('abbv' above). However, for further reading please see:
Returns a (hopefully) meaningful error string.
This website is for informational purposes only and is not intended to provide specific commercial, financial, investment, accounting, tax, or legal advice. It is provided to you solely for your own personal, non-commercial use and not for purposes of resale, distribution, public display or performance, or any other uses by you in any form or manner whatsoever. Unless otherwise indicated on this website, you may display, download, archive, and print a single copy of any information on this website, or otherwise distributed from XE.com, for such personal, non-commercial use, provided it is done pursuant to the User Conduct and Obligations set forth herein.
As such this software is for personal use ONLY. 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 XE.com.
The full legal document is available at http://www.xe.com/legal/
Currency symbols are currently specified with a generic symbol, if the currency symbol is unknown. Are there any other symbols available in Unicode? Let me know if there are.
There are no known bugs at the time of this release. However, if you spot a bug or are experiencing difficulties, that is not explained within the POD documentation, please send an email to firstname.lastname@example.org or submit a bug to the RT system (http://rt.cpan.org/). However, it would help greatly if you are able to pinpoint problems or even supply a patch.
Fixes are dependant upon their severity and my availablity. Should a fix not be forthcoming, please feel free to (politely) remind me.
Barbie, <email@example.com> for Miss Barbell Productions <http://www.missbarbell.co.uk>.
Copyright (C) 2002-2005 Barbie for Miss Barbell Productions. All Rights Reserved. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Module Install Instructions
To install Finance::Currency::Convert::XE, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell install Finance::Currency::Convert::XE
For more information on module installation, please visit the detailed CPAN module installation guide.