NAME

WWW::UCC - Currency conversion module.

SYNOPSIS

use WWW::UCC;
my $obj = new WWW::UCC()	|| 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;

DESCRIPTION

Currency conversion module using XE.com's Universal Currency Converter (tm) site.

METHODS

new

Creates a new WWW::UCC object.

currencies

Returns a plain array of the currencies available for conversion.

convert

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')
'text'   (returns '12.34 British Pounds')

If format key is omitted, 'number' is assumed and the converted value is returned.

error

Returns a (hopefully) meaningful error string.

TERMS OF USE

XE.com have a Terms of Use policy that states:

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/

AUTHOR

Barbie, E<lt>barbie@cpan.orgE<gt>
Miss Barbell Productions, L<http://www.missbarbell.co.uk/>

SEE ALSO

WWW::Mechanize
HTML::TokeParser

perl(1)

COPYRIGHT

Copyright (C) 2002-2003 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.