Arnaud "Arhuman" Assad > Data-FR-Town-0_03 > Data::FR::Town

Download:
Data-FR-Town-0_03.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0_03   Source  

NAME ^

Data::FR::Town - Provides data about french town (INSEE code, ZIP/postal code, name...)

VERSION ^

Version 0_03

SYNOPSIS ^

This module provides basic data about french towns.

    use Data::FR::Town;

    # Multiple ways to get the same town
    my $town1 = Data::FR::Town->new( {insee => "01001"});
    my $town2 = Data::FR::Town->new( {zip => "01400"});
    my $town3 = Data::FR::Town->find( {insee => "01001"});
    my $town3 = Data::FR::Town->find( {zip => "01400"});

    Now you can get data about the selected town, using the getters :

    my $zip = $town1->zip();
    my $name = $town1->name();
    my $cname = $town1->cname();
    ...

SUBROUTINES/METHODS ^

new ( \%params )

Return a town object selected through the specified parameters.

%params accept two valid keys : 'insee' and 'zip' to specfy the town.

find ( \%params )

Return a town object selected through the specified parameters.

%params accept two valid keys : 'insee' and 'zip' to specfy the town.

insee ()

Return the INSEE code associated to this town

zip ()

Return the zip/postal code associated to this town

article ()

Return the article associated to this town, as some french town may have one. (La Courneuve)

name ()

Return the name of the town The first letter is uppercased the other ones are lowercase

cname ()

Return the capitalized name of the town All letters are (non accentuated) uppercase.

dep ()

Return the department's number

depname ()

Return the department's name

DISCLAIMER ^

This version is based on the data from the INSEE site : http://www.insee.fr/fr/methodes/nomenclatures/cog/telechargement/2012/txt/comsimp2012.zip

As this data is free and quite stable, the information about the INSEE code, name are quite accurate.

The information about the postal/zip code is however much more difficult to get AND subject to change.

I'll try to keep the postal/zip codes up to date, but anyone knowing a way to get automatically these data could greatly contribute by telling it (or providing the data)

Don't hesitate to contact me on this subject.

Arnaud (Arhuman) ASSAD, <arhuman at gmail.com>

AUTHOR ^

Arnaud (Arhuman) ASSAD, <arhuman at gmail.com>

BUGS ^

Please report any bugs or feature requests to bug-data-fr-town at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Data-FR-Town. I will be notified, and then you'll

SUPPORT ^

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

    perldoc Data::FR::Town

You can also look for information at:

ACKNOWLEDGEMENTS ^

LICENSE AND COPYRIGHT ^

Copyright 2012 Arnaud (Arhuman) ASSAD.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

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

syntax highlighting: