diff options
author | franck cuny <franck@lumberjaph.net> | 2011-02-08 17:41:18 +0100 |
---|---|---|
committer | franck cuny <franck@lumberjaph.net> | 2011-02-08 17:41:18 +0100 |
commit | 147e0d1a3a479257ac180cc7a7104a689fdfd211 (patch) | |
tree | 9896551ab20da581db5e0a6a62882e3eab78d822 /lib/WebService | |
parent | add dist.ini (diff) | |
download | webservice-google-suggest-147e0d1a3a479257ac180cc7a7104a689fdfd211.tar.gz |
prepare to release
Diffstat (limited to 'lib/WebService')
-rw-r--r-- | lib/WebService/Google/Suggest.pm | 26 |
1 files changed, 4 insertions, 22 deletions
diff --git a/lib/WebService/Google/Suggest.pm b/lib/WebService/Google/Suggest.pm index e1d6598..bef6993 100644 --- a/lib/WebService/Google/Suggest.pm +++ b/lib/WebService/Google/Suggest.pm @@ -1,15 +1,15 @@ package WebService::Google::Suggest; +# ABSTRACT: Google Suggest as an API + use strict; -use vars qw($VERSION); -$VERSION = '0.04'; +use warnings; use Carp; use LWP::UserAgent; use URI::Escape; -use vars qw($CompleteURL); -$CompleteURL = "http://www.google.com/complete/search?hl=en&js=true&qu="; +our $CompleteURL = "http://www.google.com/complete/search?hl=en&js=true&qu="; sub new { my $class = shift; @@ -37,7 +37,6 @@ sub complete { while ( $array =~ /\[([^\]]+)\]/g ) { my $row = $1; my ( $query, $count, $rank ) = $row =~ /\"([^"]+)\",\"([\d]+)?\",\"([\d]+)?\"/; - $count =~ tr/,//d; $count += 0; # numify $rank += 0; push @results, { query => $query, results => $count, rank => $rank }; @@ -49,10 +48,6 @@ sub complete { 1; __END__ -=head1 NAME - -WebService::Google::Suggest - Google Suggest as an API - =head1 SYNOPSIS use WebService::Google::Suggest; @@ -105,19 +100,6 @@ properties. =back -=head1 AUTHOR - -Tatsuhiko Miyagawa E<lt>miyagawa@bulknews.netE<gt> - -Franck Cuny E<lt>franck@lumberjaph.netE<gt> - -=head1 LICENSE - -This library is free software; you can redistribute it and/or modify -it under the same terms as Perl itself. - -This module gives you B<NO WARRANTY>. - =head1 SEE ALSO http://www.adamstiles.com/adam/2004/12/hacking_google_.html |