Thursday, March 26, 2009
Posted by JDrago at 10:19 PM
Somehow all of our information ends up on Google. Now we can treat Google like a database and query it with SQL just like a simple database:
use warnings 'all';
my $key = 'ABQIAAA...-P_bCg';
my $dbh = DBI->connect("dbi:Google:", $key);
my $sth = $dbh->prepare('SELECT title, URL FROM google WHERE q = "perl"');
while( my $rec = $sth->fetchrow_hashref )
warn Dumper( $rec );
}# end while()
Unfortunately, it requires you to get a Google SOAP API Key, which Google no longer supports.
Perhaps the author, Darren Chamberlain, will consider upgrading DBD::Google to use REST::Google or something similar instead.
Here's to hoping :-)