Renato Santos de Souza > WWW-Correios-CEP > WWW::Correios::CEP

Download:
WWW-Correios-CEP-1.01.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 1.01   Source  

NAME ^

WWW::Correios::CEP - Perl extension for extract address from CEP (zip code) number

SYNOPSIS ^

        use WWW::Correios::CEP;

        my $cepper = WWW::Correios::CEP-new;

        my $address = $cepper->find( $cep );

    print $address->{street}; # neighborhood, location, uf

DESCRIPTION ^

This module fetches CEP information (Brazilian ZIP codes) directly from the Correios website, Brazil's official post office company.

METHODS ^

new

Creates a new instance of WWW::Correios::CEP. Accepts the following arguments:

find( $cep )

Recieves the CEP string and tries to get address data. Returns a hashref with the following keys:

If there is more than one address, it returns a list of hashrefs in list context, or just the first hashref in scalar context, together with an "address_count" key with the total returned addresses.

SEE ALSO ^

WWW::Correios::SRO

BUGS AND LIMITATIONS ^

You may reports on github:

https://github.com/renatocron/WWW--Correios--CEP/issues

SUPPORT ^

Perldoc

You can find documentation for this module with the perldoc command.

        perldoc WWW\:\:Correios\:\:CEP

Github

If you want to contribute with the code, you can fork this module on github:

https://github.com/renatocron/WWW--Correios--CEP

AUTHOR ^

Renato CRON, <rentocron@cpan.org>

ACKNOWLEDGEMENTS ^

2011 - Special thanks to Gabriel "gabiru" Andrade for providing a better solution for finding addresses!

2014 - Thanks to Garu, for removing legacy test code and improving docs!

COPYRIGHT AND LICENSE ^

Copyright (C) 2011-2014 by RenatoCRON

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.10.1 or, at your option, any later version of Perl 5 you may have available.

See http://dev.perl.org/licenses/ for more information.

syntax highlighting: