summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfranck cuny <franck@lumberjaph.net>2011-02-08 17:41:18 +0100
committerfranck cuny <franck@lumberjaph.net>2011-02-08 17:41:18 +0100
commit147e0d1a3a479257ac180cc7a7104a689fdfd211 (patch)
tree9896551ab20da581db5e0a6a62882e3eab78d822
parentadd dist.ini (diff)
downloadwebservice-google-suggest-147e0d1a3a479257ac180cc7a7104a689fdfd211.tar.gz
prepare to release
Diffstat (limited to '')
-rw-r--r--Changes3
-rw-r--r--lib/WebService/Google/Suggest.pm26
2 files changed, 7 insertions, 22 deletions
diff --git a/Changes b/Changes
index f0c7b23..a75d28c 100644
--- a/Changes
+++ b/Changes
@@ -1,5 +1,8 @@
Revision history for Perl extension WebService::Google::Suggest
+0.05 Tue 08 Feb 2011 03:56:08 PM CET
+ - Fixed per Google suggest JavaScript updates
+
0.04 Tue 10 Nov 2009 05:26:27 PM CET
- Fixed per Google Suggest JavaScript updates
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