|
NAMEGeo::Postcodes - Base class for the Geo::Postcodes::* modulesSYNOPSISThis 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. ABSTRACTGeo::Postcodes - Base class for the Geo::Postcodes::* modules. It is useless on its own.PROCEDURES AND METHODSThese 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.address, borough, county, location, owner, postcode, type, type_verboseMethods for accessing the fields of a postcode object. The individual country modules can support as many of them as needed, and add new ones.address_of, borough_of, county_of, location_of, owner_of, postcode_of, type_of, type_verbose_ofProcedures 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, is_fieldget_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.legal, validProcedures that return true if the postcode is legal (syntactically), or valid (in actual use).newThis will create a new postcode object.selection, selection_loopProcedures/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. verify_selectionlist, is_legal_selectionmode, is_legal_initial_selectionmode get_selectionmodes, get_initial_selectionmodesSupporting procedures when using selection or selection_loop.See the selection manual; perldoc Geo::Postcodes::Selection or man Geo::Postcodes::Selection for usage details. get_postcodesThis will return an unsorted list of all the postcodes.get_typesThis will return a list of types. See the next section.type2verbosemy $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. TYPEThis class defines the following types for the postal locations:
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. DESCRIPTIONThis is the base class for the Geo::Postcodes::* modules.CAVEATThis module uses inside out objects, see for instance <http://www.stonehenge.com/merlyn/UnixReview/col63.html> for a discussion of the concept.SEE ALSOSee 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 AND LICENCECopyright (C) 2006 by Arne Sommer - perl@bbop.orgThis library is free software; you can redistribute them and/or modify it under the same terms as Perl itself.
Visit the GSP FreeBSD Man Page Interface. |