
WWW::LEO - Perl interface to the English-German online dictionary at http://dict.leo.org

use WWW::LEO;
use Data::Dumper;
my $leo = WWW::LEO->new;
$leo->query("@ARGV");
if ($leo->num_results) {
my $i;
foreach my $resultpair (@{$leo->en_de}) {
printf "%3d: %-40s %s\n", ++$i, @$resultpair;
}
} else {
print "Sorry, your query for '%s'gave no results.\n", $leo->query;
}

This module provides an interface to the English-German online dictionary located at http://dict.leo.org.
newThis constructs a new WWW::LEO object. You can pass a hashref with configuration info to the constructor. Currently recognized key words are:
agentsets the user agent string that is used to identify the module
queryIf a scalar is supplied, queries the dictionary for the string contained within. Returns the number of results.
If no argument is given, returns the query string of the last query. Returns undef if no query has been made yet with this object.
resetResets the WWW::LEO object to the state as if no query had been made. Returns the resetted WWW::LEO object.
This method shouldn't be used in normal cases. It's there to provide the possibility of explicitely cleaning up the WWW::LEO object.
agentReturns the LWP::UserAgent object that WWW::LEO uses to query the dictionary.
requestReturns the HTTP::Request object that WWW::LEO passes to LWP::UserAgent when quering the dictionary.
responseReturns the HTTP::Response object that results from the query to the dictionary.
num_resultsReturns the number of results of the last query.
Returns undef if no query has been made.
maxlen_deThis is a convenience method: returns the longest string in of the English results.
Returns undef if no query has been made.
maxlen_enThis is a convenience method: returns the longest string of the German results.
Returns undef if no query has been made.
en_deReturns a reference to an array whose elements are references to arrays containing the English and German result pairs in elements 0 and 1, respectively.
enConvenience method: Returns an array reference containing the English results.
deConvenience method: Returns an array reference containing the English results.
None, as this is an object-oriented module.

for a simple example
for a fully-fledged program
irssi IRC client, see http://www.irssi.org)

Also see the TODO file contained in the module distribution.

Please contact the current maintainer of this module to report any bugs or suggest changes to this module:
Jörg Ziefle <ziefle@cpan.org>

Jörg Ziefle <ziefle@cpan.org>

Copyright 2002 by Jörg Ziefle
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.