Andy Armstrong > WWW-ErnestMarples > WWW::ErnestMarples

Download:
WWW-ErnestMarples-0.01.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.01   Source  

NAME ^

WWW::ErnestMarples - Interface to the ernestmarples.com UK postcode lookup API

VERSION ^

This document describes WWW::ErnestMarples version 0.01

SYNOPSIS ^

  use WWW::ErnestMarples;

  my $em = WWW::ErnestMarples->new;
  my ( $lat, $lon ) = $em->lookup('CA9 3NT');

INTERFACE ^

new

Create a new WWW::ErnestMarples. Accepts named arguments. The only argument currently supported is service which gives the base URL of the lookup service. Defaults to http://ernestmarples.com/.

  my $em = WWW::ErnestMarples->new( 
    service => 'http://localhost/emtest.cgi' 
  );

For normal use pass no args:

  my $em = WWW::ErnestMarples->new;

lookup

Look up a UK postcode. The return value is a list containing latitude, longitude of the postcode.

  my ( $lat, $lon ) = $em->lookup( $my_postcode );

CAVEATS ^

From http://ernestmarples.com/:

  Important: Given the inherent unreliability of using a service like
  this, it's probably sensible to let us know you're using it so we can
  hang on to your email and let you know if anything important happens.
  Hopefully the Royal Mail will be nice, and license us to use the
  postcode database. Then you'll be able to rely on us and this service
  will become a seamless and transparent part of the web's
  infrastructure, like it ought to be.

Visit the site for more information.

CONFIGURATION AND ENVIRONMENT ^

WWW::ErnestMarples requires no configuration files or environment variables.

DEPENDENCIES ^

HTML::Tiny, LWP::UserAgent, Test::More.

BUGS AND LIMITATIONS ^

Please report any bugs or feature requests to bug-www-ernestmarples@rt.cpan.org, or through the web interface at http://rt.cpan.org.

AUTHOR ^

Andy Armstrong <andy@hexten.net>

LICENCE AND COPYRIGHT ^

Copyright (c) 2009, Andy Armstrong <andy@hexten.net>.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.

syntax highlighting: