Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Perl Modules

    Geo::Postcode 0.17

    Download button

    No screenshots available
    Downloads: 408  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    William Ross | More programs
    Perl Artistic License / FREE
    November 9th, 2011, 06:36 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    Geo::Postcode description

    UK Postcode validation and location

    Geo::Postcode is a Perl module that will accept full or partial UK postcodes, validate them against the official spec, separate them into their significant parts, translate them into map references or co-ordinates and calculate distances between them.

    It does not check whether the supplied postcode exists: only whether it is well-formed according to British Standard 7666, which you can find here:

     http://www.govtalk.gov.uk/gdsc/html/frames/PostCode.htm

    Geo::Postcode will also work with partial codes, ie areas, districts and sectors. They won't validate, but you can test them for legitimacy with a call to valid_fragment, and you can still turn them into grid references.

    To work with US zipcodes, you need Geo::Postalcode instead.

    SYNOPSIS

     use Geo::Postcode;
     my $postcode = Geo::Postcode->new('SW1 1AA');

     return unless $postcode->valid;
     my ($n, $e) = ($postcode->gridn, $postcode->gride);

     # is the same as

     my ($n, $e) = $postcode->coordinates;

     # and alternative to
     
     my @location = ($postcode->lat, $postcode->long);
     
     # or the impatient can skip the construction step:
     
     my ($n, $e) = Geo::Postcode->coordinates('SW1 1AA');
     
     my $clean_postcode = Geo::Postcode->valid( $postcode );

     my ($unit, $sector, $district, $area) = Geo::Postcode->analyse('SW1 1AA');



    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    postcode validation | postcode location | UK postcode | UK | postcode | validation

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM