Marcus Ramberg > Catalyst-Plugin-Geography > Catalyst::Plugin::Geography

Download:
Catalyst-Plugin-Geography-0.03.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  0
View/Report Bugs
Module Version: 0.01   Source  

NAME ^

Catalyst::Plugin::Geography - Retrieve geographical information

SYNOPSIS ^

    use Catalyst qw[Geography];

    # Retrieve country or code from current user
    print $c->geography->country;
    print $c->geography->code;

    # Retrieve country or code from IP
    print $c->geography->country('66.102.9.99');
    print $c->geography->code('66.102.9.99');

    # Retrieve country or code from hostname
    print $c->geography->country('www.google.com');
    print $c->geography->code('www.google.com');
    
    # Retrieve country from code
    print $c->geography->country('US');
    
    # Alias
    print $c->geo->code('www.google.com');
    print $c->geo->country('US');

DESCRIPTION ^

Retrieve geographical country and country codes from users.

METHODS ^

geo

alias to geography

geography

Will create or return a Catalyst::Plugin::Geography::Implementation object.

SEE ALSO ^

Catalyst Catalyst::Plugin::Geography::Implementation.

AUTHOR ^

Christian Hansen, ch@ngmedia.com Marcus Ramberg, mramberg@cpan.org

LICENSE ^

This library is free software. You can redistribute it and/or modify it under the same terms as perl itself.

syntax highlighting: