The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Lingua::Postcodes - Returns the names of postcodes/zipcodes

VERSION

version 0.005

SYNOPSIS

    use Lingua::Postcodes;

    print 'The English name of a postcode in the UK is:', Lingua::Postcodes::name('GB');
    # The English name of a postcode in the UK is Postcode

    print 'The English name of a postcode in Japan is:', Lingua::Postcodes::name('JP', 'EN');
    # The English name of a postcode in Japan is Postal code

    print 'The Japanese name of a postcode in Japan is:', Lingua::Postcodes::name('JP', 'JP');
    # The Japanese name of a postcode in Japan is 郵便番号

    # Alternate usage:

    use Ligua::Postcodes 'name';
    print 'The Japanese name of a postcode in Japan is:', name('JP', 'JP');
    # The Japanese name of a postcode in Japan is 郵便番号

    # Unknown postcodes/systems
    print 'No postal code system for this country' if Lingua::Postcodes::name('ZZZZZZ') eq undef;
    print 'We do not have the translation' if Lingua::Postcodes::name('GB', 'FR') eq 'undef';

DESCRIPTION

This module allows the easy translation of the name of postcodes (postal codes/ zip codes).

Specifically it has been written to give the English name for post codes in other countries. When working on a multi-national website, where address information is required, this module helps the developer to put the correct term in the label of a HTML form to match the nation. For example, when handling the various names for postcodes across Europe.

This module does not parse or handle postcodes themselves; it simply provides a programmatic way of getting the correct name for postcodes for nations.

Reference for if/what a postcode is called in mainly referencing: https://en.wikipedia.org/wiki/List_of_postal_codes

NAME

Lingua::Postcodes - Provide names for postcodes/zipcodes

VERSION

version 0.005

AUTHOR

Lance Wicks <lancew@cpan.org>

LICENSE AND COPYRIGHT

Copyright (c) 2016, Lance Wicks. All rights reserved.

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

AUTHOR

Lance Wicks <lancew@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2016 by Lance Wicks.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.