Geo::PostalAddress

Geo::PostalAddress is a Perl module for country-specific postal address parsing/formatting.
Download

Geo::PostalAddress Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Michel Lavondes
  • Publisher web site:
  • http://search.cpan.org/~pauamma/Geo-PostalAddress-0.04/PostalAddress.pm

Geo::PostalAddress Tags


Geo::PostalAddress Description

Geo::PostalAddress is a Perl module for country-specific postal address parsing/formatting. Geo::PostalAddress is a Perl module for country-specific postal address parsing/formatting.This module converts postal (snail mail) addresses between an unstructured country-neutral format (an array of character strings) and a country-specific format that's hopefully meaningful by postal authorities, courier/delivery services, residents, ... of that country for postal address entry. It should handle most countries out of the box with only minor or technical divergences from approved bulk-mailing formats; if needed, country-specific code can be added to make it fully conformant to those formats.The intended audience for this module is anyone needing to handle most addresses in a recognizable country-specific format, without going into the full generality and complexity that UPU standards would appear to require.SYNOPSIS use Geo::PostalAddress; my $AU_parser = Geo::PostalAddress->new('AU'); my $format = $AU_parser->format(); # $format now contains: # , , , , 3, # , # , ] # 40 in is the suggested displayed field width (not the maximum # length). 3 means that the next 3 fields should/could be on the same row. # means an enumerated list is used for this field, with keys # being the stored values and values being the labels used for display or # selection. my $display = $AU_parser->display(); # $display now contains: # {Addr1 => "4360 DUKES RD", City => "KALGOORLIE", # State => "WA", Postcode => "6430"} my $US_parser = Geo::PostalAddress->new('US'); my $address = {Addr1 => "123 MAGNOLIA ST", City => "HEMPSTEAD", State => "NY", ZIP => "115501234"}; my $result = $US_parser->storage($address); unless (ref $result) { carp "Bad postal address: $result.n"; } my $AU_to_US_address_label = $US_parser->label("AU", "MR JOHN DOE", $result); # What to print on an address label or on an envelope, if mailing from # Australia to the United States. Requirements: · Perl


Geo::PostalAddress Related Software