本間 雅洋 (Masahiro Honma) > WWW-YahooJapan-KanaAddress-0.1.4_2 > WWW::YahooJapan::KanaAddress

Download:
WWW-YahooJapan-KanaAddress-0.1.4_2.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
Report a bug
Module Version: 0.1.4_2   Source   Latest Release: WWW-YahooJapan-KanaAddress-0.20

NAME ^

WWW::YahooJapan::KanaAddress - translating the address in Japan into kana.

SYNOPSIS ^

    use WWW::YahooJapan::KanaAddress;

    my $yahoo = WWW::YahooJapan::KanaAddress->new();
    print $yahoo->search('山梨県', '鰍沢町', '鳥屋'), "\n";

results:

    やまなしけんかじかざわちょうとや

DESCRIPTION ^

This class translates the address written in Kanji into Kana by using Yahoo! Japan Maps.

Methods

my $yahoo = WWW::YahooJapan::KanaAddress->new( ua => 'your LWP::UserAgent');

a constructor. You can set a LWP::UserAgent object if you want.

my ($kana_ken, $kana_shiku, $kana_choaza) = $yahoo->search($ken, $shiku, $choaza);

search kana by Yahoo!Japan Maps. The arguments and return values must be encoded to euc-jp. You can't use unicode string.

$ken

Prefecture in Japan, should be ended with '都' or '道' or '府' or '県'.

$shiku

Name of city and district, should be ended with '市' or '区' or '町' or '村'.

$choaza

The rest of the string of address. It might contain '町' and '字'.

You can use a vague address to some degree. For example:

    print $yahoo->search('茨城県', '龍ヶ崎市', '米町'), "\n";
    print $yahoo->search('茨城県', '龍崎市', '米町'), "\n";
    print $yahoo->search('茨城県', '竜が崎市', '米町'), "\n";

These sentences output the same result. This is a function of Yahoo!Japan Maps.

CONFIGURATION AND ENVIRONMENT ^

WWW::YahooJapan::KanaAddress requires no configuration files or environment variables.

DEPENDENCIES ^

LWP::UserAgent, and Yahoo!Japan :-p

INCOMPATIBILITIES ^

None reported.

BUGS AND LIMITATIONS ^

No bugs have been reported.

Please report any bugs or feature requests to hiratara@cpan.org, or through the web interface at http://rt.cpan.org.

AUTHOR ^

Masahiro Honma <hiratara@cpan.org>