From 147e0d1a3a479257ac180cc7a7104a689fdfd211 Mon Sep 17 00:00:00 2001 From: franck cuny Date: Tue, 8 Feb 2011 17:41:18 +0100 Subject: prepare to release --- lib/WebService/Google/Suggest.pm | 26 ++++---------------------- 1 file changed, 4 insertions(+), 22 deletions(-) (limited to 'lib/WebService') 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 Emiyagawa@bulknews.netE - -Franck Cuny Efranck@lumberjaph.netE - -=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. - =head1 SEE ALSO http://www.adamstiles.com/adam/2004/12/hacking_google_.html -- cgit 1.4.1