WebService-OkiLab-ExtractPlace

 view release on metacpan or  search on metacpan

lib/WebService/OkiLab/ExtractPlace.pm  view on Meta::CPAN


Accessor and mutator method to some params such as 'ua', 'url', 'req', 'res'.
When no arguments has passed, it returns existing parameter name. 
When parameter name has passed, it returns the parameter value. 
When parameter name and value have passed, it set the value as the parameter value and returns set value. 

=back

=head1 DIAGNOSTICS

It only return undef when something failed.
In that time 

The error text can be acquired in the errstr method at this time. 
These are as follows. 

=over 4

=item Can't load LWP::UserAgent object.

It occurs when WebService::OkiLab::ExtractPlace can't get LWP::UserAgent object.
Maybe LWP::UserAgent is not available, or invalid value has been set with ua method.

=item Web service url is invalid. (%s)

It occurs when url of seb service is invalid.
Current value is set into '%s'.
Maybe invalid value has been set with url method.

=item Text is empty.

It occurs when the text to be analyzed is empty (or blank).
Please confirm the argument given to extract(). 

=item Response is empty.

It occurs when it fails to receive response from the Web service.
Please confirm the state of the LWP::UserAgent object, HTTP::Request object by ua() and req().

=item Request failed. (%s)

It occurs when response from the Web service does not indicate success.
HTTP response code and message is set into '%s'.
Please confirm the state of the HTTP::Request object, HTTP::Response object by req() and res().

=item Response content is empty.

It occurs when the response content is empty (or blank).
Please confirm the state of the HTTP::Request object, HTTP::Response object by req() and res().

=item Can't parse response content.

It occurs when the response content is not able to parse as JSON data.
Please confirm the content of the HTTP::Request object by res().

=back

=head1 CONFIGURATION AND ENVIRONMENT

WebService::OkiLab::ExtractPlace accesses to the Web service via http.
When it is necessary to use proxy, you may set environment variable HTTP_PROXY.
When proxy needs authentication, the following notations can be used. 

 HTTP_PROXY=http://user:password@host:port

You can specify proxy settings directory to LWP::UserAgent object instead of using environment variable.

=head1 DEPENDENCIES

=over 4

=item * Class::ErrorHandler

=item * LWP::UserAgent

=item * JSON

=back

=head1 INCOMPATIBILITIES

None reported.

=head1 BUGS AND LIMITATIONS

No bugs have been reported.

=head1 SEE ALSO

=over 4

=item * http://okilab.jp/location/2007/11/api_1.html

=back

=head1 AUTHOR

Makio Tsukamoto  C<< <tsukamoto@gmail.com> >>

=head1 LICENCE AND COPYRIGHT

Copyright (c) 2007, Makio Tsukamoto C<< <tsukamoto@gmail.com> >>. All rights reserved.

This module is free software; you can redistribute it and/or
modify it under the same terms as Perl itself. See L<perlartistic>.

=head1 DISCLAIMER OF WARRANTY

BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE
ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH
YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
NECESSARY SERVICING, REPAIR, OR CORRECTION.

IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE
LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL,
OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE
THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING



( run in 0.455 second using v1.01-cache-2.11-cpan-71847e10f99 )