GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Geo::Postcodes(3) User Contributed Perl Documentation Geo::Postcodes(3)

Geo::Postcodes - Base class for the Geo::Postcodes::* modules

This module should not be used directly from application programs, but from a country subclass; e.g.:

 package Geo::Postcodes::U2;

 use Geo::Postcodes 0.30;
 use base qw(Geo::Postcodes);

 use strict;
 use warnings;

 our $VERSION = '0.30';

And so on. See the documentation for making country subclasses for the gory details; perldoc Geo::Postcodes::Subclass or man Geo::Postcodes::Subclass.

Geo::Postcodes - Base class for the Geo::Postcodes::* modules. It is useless on its own.

These procedures and methods should, with a few exceptions, not be used directly, but from a country module. See the documentation for the indiviual country modules for usage details.

Methods for accessing the fields of a postcode object. The individual country modules can support as many of them as needed, and add new ones.

Procedures that returns the value of the corresponding field for the given postcode. They will return undef if the postcode does not exist, or the field is without value for the given postcode.

get_fields() will return a list of all the fields supported by the module, and is_field($field) will return true (1) if the specified field is supported by the module.

Procedures that return true if the postcode is legal (syntactically), or valid (in actual use).

This will create a new postcode object.

Procedures/methods for selecting several postcodes at once.

See the selection manual (perldoc Geo::Postcodes::Selection or man Geo::Postcodes::Selection) for usage details, and the tutorial (perldoc Geo::Postcodes::Tutorial or man Geo::Postcodes::Tutorial) for sample code.

Supporting procedures when using selection or selection_loop.

See the selection manual; perldoc Geo::Postcodes::Selection or man Geo::Postcodes::Selection for usage details.

This will return an unsorted list of all the postcodes.

This will return a list of types. See the next section.

  my $type_as_english_text  = $Geo::Postcodes::type2verbose($type);
  my $type_as_national_text = $Geo::Postcodes::U2:type2verbose($type);

This procedure gives an english description of the type. Use the child class directly for a description in the native language.

This class defines the following types for the postal locations:
BX
Post Office box
ST
Street address
SX
Service box (as a Post Office box, but the mail is delivered to the customer).
IO
Individual owner (a company with its own postcode).
STBX
Either a Street address (ST) or a Post Office box (BX)
MU
Multiple usage (a mix of the other types)
PP
Porto Paye receiver (mail where the reicever will pay the postage).
PN
Place name

The child classes can use them all, or only a subset, but must not define their own additions. The child classes are responsible for adding descriptions in the native language, if appropriate.

This is the base class for the Geo::Postcodes::* modules.

This module uses inside out objects, see for instance <http://www.stonehenge.com/merlyn/UnixReview/col63.html> for a discussion of the concept.

See also the selection manual (perldoc Geo::Postcodes::Selection or man Geo::Postcodes::Selection) for usage details, the tutorial (perldoc Geo::Postcodes::Tutorial or man Geo::Postcodes::Tutorial) for sample code, and the ajax tutorial (perldoc Geo::Postcodes::Ajax or man Geo::Postcodes::Ajax) for information on using the modules in combination with ajax code in a html form to get the location updated automatically.

The latest version of this library should always be available on CPAN, but see also the library home page; http://bbop.org/perl/GeoPostcodes for additional information and sample usage. The child classes that can be found there have some sample programs.

Copyright (C) 2006 by Arne Sommer - perl@bbop.org

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

2006-10-01 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.