Business-GL-Postalcode
view release on metacpan or search on metacpan
lib/Business/GL/Postalcode.pm view on Meta::CPAN
=head2 get_postalcode_from_city
Takes a string representing a Danish/Greenlandic city name.
Returns a reference to an array containing zero or more postal codes related to that city name. Zero indicates nothing was found.
Please note that city names are not unique, hence the possibility of a list of postal codes.
use Business::GL::Postalcode qw(get_postalcode_from_city);
my $city = 'Nuuk';
my $postalcodes = get_postalcode_from_city($city);
if (scalar @{$postalcodes} == 1) {
print "$city is unique\n";
} elsif (scalar @{$postalcodes} > 1) {
warn "$city is NOT unique\n";
} else {
die "$city not found\n";
}
=head1 DIAGNOSTICS
There are not special diagnostics apart from the ones related to the different
subroutines.
=head1 CONFIGURATION AND ENVIRONMENT
This distribution requires no special configuration or environment.
=head1 DEPENDENCIES
=over
=item * L<https://metacpan.org/pod/Carp> (core)
=item * L<https://metacpan.org/pod/Exporter> (core)
=item * L<https://metacpan.org/pod/Data::Handle>
=item * L<https://metacpan.org/pod/List::Util>
=item * L<https://metacpan.org/pod/Params::Validate>
=back
=head2 TEST
Please note that the above list does not reflect requirements for:
=over
=item * Additional components in this distribution, see F<lib/>. Additional
components list own requirements
=item * Test and build system, please see: F<Build.PL> for details
=back
=head1 BUGS AND LIMITATIONS
There are no known bugs at this time.
The data source used in this distribution by no means is authorative when it
comes to cities located in Denmark, it might have all cities listed, but
unfortunately also other post distribution data.
=head1 BUG REPORTING
Please report issues via CPAN RT:
=over
=item * Web (RT): L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Business-GL-Postalcode>
=item * Web (Github): L<https://github.com/jonasbn/perl-Business-GL-Postalcode/issues>
=item * Email (RT): L<bug-Business-GL-Postalcode@rt.cpan.org>
=back
=head1 SEE ALSO
=over
=item L<Business::DK::Postalcode>
=item L<Business::FO::Postalcode>
=back
=head1 MOTIVATION
Postdanmark the largest danish postal and formerly stateowned postal service, maintain the
postalcode mapping for Greenland and the Faroe Islands. Since I am using this resource to
maintain the danish postalcodes I decided to release distributions of these two other countries.
=head1 AUTHOR
Jonas B. Nielsen, (jonasbn) - C<< <jonasbn@cpan.org> >>
=head1 COPYRIGHT
Business-GL-Postalcode is (C) by Jonas B., (jonasbn) 2014-2019
Business-GL-Postalcode is released under the artistic license 2.0
=cut
( run in 1.918 second using v1.01-cache-2.11-cpan-39bf76dae61 )