NAME
WWW::PlaceEngine - get PC's location information from PlaceEngine.
SYNOPSIS
use WWW::PlaceEngine;
my $wpl = WWW::PlaceEngine->new();
my $loc = $wpl->get_location() or die $wpl->errcode;
DESCRIPTION
This module get PC's location information from PlaceEngine client and API host. For PlaceEngine, See to http://www.placeengine.com/.
METHODS
- new()
- new( %options )
-
returns a WWW::PlaceEngine object.
my $wpl = WWW::PlaceEngine->new();
new
can take some options.my $wpl = WWW::PlaceEngine->new(site => 'http://example.com/', appkey => 'WRO4eQ....UgTWFw');
Following options are supported:
- site
- appkey
-
PlaceEngine needs site page URL and appkey for site pair to get location information from host. By default, site and appkey are set to http://www.placeengine.com/map and its appkey. You can change them your own site and appkey pair to by this option.
- host
-
URL of PlaceEngine API host. http://www.placeengine.com/api by default.
- rtagd URL of PlaceEngine client daemon. http://localhost:5448 by default.
- site()
- site( $site )
-
get or set site page URL by this method.
- appkey()
- appkey( $appkey )
-
get or set appkey for site by this method.
- host()
- host( $host )
-
get or set URL of PlaceEngine API host by this method.
- rtagd()
- rtagd( $rtagd )
-
get or set URL of PlaceEngine client daemon by this method.
- get_location()
-
get PC's location information from PlaceEngine client and API host. This returns WWW::PlaceEngine::Object object for normal value. If error occurs, this returns undef value.
- err
-
returns error string if error occurs.
- errcode
-
return error code if error occurs.
DEPENDENCIES
Readonly JSON
SEE ALSO
http://www.placeengine.com/ WWW::PlaceEngine::Object
AUTHOR
OHTSUKA Ko-hei, <nene[at]kokogiko.net>
COPYRIGHT AND LICENSE
Copyright 2006 by OHTSUKA Ko-hei
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.