This software provides an interface to the ernestmarples.com API for UK postcode lookup. It enables users to easily access postcode information for any location in the UK.
To get started with the interface, you just need to include it in your Perl code and create a new instance of WWW::ErnestMarples with named arguments. At the moment, the only available argument is 'service', which refers to the base URL of the lookup service. The default value is an empty string.
Here's an example:
use WWW::ErnestMarples;
my $em = WWW::ErnestMarples->new(
service => ''
);
If you don't need to specify any arguments, you can simply use the new() method without any parameters as shown below:
my $em = WWW::ErnestMarples->new;
Finally, to use the lookup functionality, you just need to call the lookup() method and pass it a UK postcode. The method will return the latitude and longitude of the specified postcode.
Here's the code:
my ( $lat, $lon ) = $em->lookup( $my_postcode );
In summary, if you're looking for an easy-to-use Perl interface for UK postcode lookup, I would definitely recommend giving WWW::ErnestMarples a try. It's simple, efficient, and gets the job done.
Version 0.01: N/A